Questions tagged as 'java'

2
answers

How do I solve an Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: empty String?

My code is this: import java.awt.Font; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; /* *- Interfaz Nomina - * Programa que muestra una interfaz para consultar n...
asked by 05.12.2018 / 22:58
1
answer

Format Excel Date in Java

I have a question, I hope someone can help me: In Excel, inside a cell I have a date, for example, today: 2/12/2018 To this cell I give a right click - > Format of cells and format as a number, with which I have the following result:...
asked by 05.12.2018 / 22:23
1
answer

JRLoader.loadObject error of JasperReport

I'm new to this jasper report , I do not know if I'm missing something or why I get this error: My Code line with error: JasperReport reporte = (JasperReport) JRLoader.loadObject("ReporteComisiones.jasper"); It's a maven project,...
asked by 23.11.2018 / 21:44
1
answer

How can I know all the classes that are extended to another abstract class?

Hello everyone JAVA Well, these last days I was working on a project of a game and some asked me to implement a kind of "API" so that they can make their own "PLAYERS", example: public class ejemplo extends MakeAPlayer{} "MakeAPlayer...
asked by 20.08.2016 / 06:04
1
answer

Wait for the Thread process to finish in order to destroy the activity

Emmmm, well, hello, it's me again, well I've been researching all over the internet how to solve this problem and until now I do not know how to solve it, the question is simple. How to wait for a thread to be processed in order to destroy the A...
asked by 10.08.2016 / 04:01
0
answers

insert with validation in SQLite

Hello I have a database in sqlite and it happens that I must add fields to a table that contains an id "integer primary key unique", the id can not be increased by other issues. The data that I add to the table I download from a webservice, now...
asked by 02.10.2018 / 05:11
1
answer

Run 3 queries in JAVA

I want to make 3 queries within a method in JAVA in order to assign a serial number to my record that has the ID number as consecutive, this is my code. public void guardar() { String erp = jComboBox1.getSelectedItem().toString(); String...
asked by 13.09.2018 / 01:44
2
answers

FATAL EXCEPTION: main. Error creating a Recyclerview adapter

I am creating a separate adapter and holder to display three data in a Recyclerview. But when I run the application I get an error. Adapter: public class AdapterProd extends RecyclerView.Adapter<HolderProd> { private ArrayList<Item...
asked by 25.09.2018 / 18:29
1
answer

Error in SQLite query? "No such table: Table (code 1):, while compiling: SELECT Field from Table"

Hi, I have a database in SQLite , and I'm trying to query a field integer called Type to make a comparison with the cases of a switch , but it shows me the error:    no such table: Table (code 1):, while compiling: SELECT F...
asked by 21.08.2018 / 17:30
12
answers

How to correctly compare Strings (and objects) in Java?

I am creating a mini game in which the user tries to guess a name. But when I want to compare two text strings to see if they are equal it does not seem to work. final String miNombre = "Jordi"; Scanner input = new Scanner(System.in); System.o...
asked by 02.12.2015 / 13:35