Questions tagged as 'java'

1
answer

Use of Swingworker in connection with standalone bank

I have an application in java that I did in my work, to control the sequence of numbering of trades, the same is in jar format in the network (I did using swing in java + HSQLDB). One problem that is not critical, but a little annoying, is th...
asked by 18.08.2015 / 12:28
1
answer

Pass multiple parameters to an SQL query

Let's say I have the following CPF's: 65568752877 86924355382 55317961378 82331493146 I would like to pass them as a parameter in a query SQL , I am trying as follows: SQL Excerpt ... " AND Beneficiario.Codigo IN ('"+codig...
asked by 07.08.2015 / 14:15
1
answer

Which classes implement the abstract type of data queue?

Given that there are classes java.util.Stack and java.util.ArrayDeque in the context of stacks, are there also Java classes that implement the abstract type of data queue?     
asked by 14.04.2017 / 19:53
1
answer

How to format a number for String by putting "."?

I was trying to format a number by putting points to make reading easier. Only with the dot does not work, but it works with commas. Ex: String s = String.format("%. d", 123456); System.out.println(s);     
asked by 02.05.2017 / 04:19
1
answer

Method does not accept passing of null to the parameter

I have the following method: public String insereRegistro(int tipo, String data, String horario, String historico, int veiculo, double km, int cliente, int solicitante, Stri...
asked by 26.01.2018 / 16:14
1
answer

Android - What is the difference between getReadableDatabase () and getWritableDatabase ()?

I was able to enter information into the database by using the getReadableDatabase() method. Should not that be a mistake then? Should not be the getWritableDatabase() method? private void savePet() { petDbHelper = new P...
asked by 24.02.2018 / 20:43
3
answers

Hibernate works OK, but does not finish the process

I do not know if this is normal, but Hibernate starts the process, inserts the object into the database, but its java process is open. What do I have to do to make this process stop automatically after insertion? Here is a code that exem...
asked by 17.02.2017 / 20:45
1
answer

Reading XLS in Java

I have a class to read an xls in java, and I need to know how to print one column next to another as well as in xls itself. So far I've only been able to print in a single race or online. NOTE: I'm using the jxl library. Follow the code:...
asked by 21.12.2016 / 17:47
1
answer

How to use setNextFocusableComponent in a JTextArea

I used setNextFocusableComponent in JTextArea , but it does not work because TAB works as a "space" within JTextArea , how to solve it?     
asked by 19.12.2016 / 04:29
1
answer

Error Non-Static method can not be reference

I'm having a problem with:    Non-static method write can not be referenced from a static context. I have tried to change the function to static , however, there it gives problem:    non static variable This is the Persona...
asked by 08.06.2018 / 13:48