Questions tagged as 'java'

1
answer

As an achievement that my jpanel gets in front of another JAVA

I am trying to make my jpanel get in front of the table when I right click on the table. But what makes me is that is behind this as seen in the image This is the part of the code I appreciate any kind of help     
asked by 07.06.2018 / 00:10
1
answer

How can I correctly declare the second If?

In my code I have to indicate what type of triangle is based on the values given in the variables "a", "b", "c" * Yes c>= a+b . It is not a triangle.  * Yes c^2 = a^2 + b^2 . It is a right triangle.  * Yes c^2 > a^2 + b^2...
asked by 27.05.2018 / 20:18
1
answer

Run java jar, does not load project files

I have a project in java, in which I open a pdf file with an option, when I run it from IntelliJ, it uploads the file without problems, but at the time of creating the .jar it does not load it and it tells me that it does not exist the file. The...
asked by 27.05.2018 / 02:37
2
answers

Failed query to database

I'm trying to make a query to a car database and it does not work for me, the function where I do the query is this: public static ArrayList<Coche> filtradoAnuncios(String valor_marca, String valor_modelo, String valor_anyoDesde, String...
asked by 20.06.2018 / 13:34
1
answer

Close session in hibernate when returning an ArrayList

I have a problem wanting to close a session in hibernate. I enclose the code that works for me public ArrayList<Empresa> getEmpresas() { Session session = null; SessionFactory sesion = HibernateUtil.getSessionFactory(); se...
asked by 21.06.2018 / 05:15
0
answers

How to ask with an if no one wins at three in a row? [closed]

I developed a program with the cat game (also called tic-tac-toe or trés online) but I only have declared the ways to win, but I do not know how to ask or put a if where I say nobody won. This is my code: package gato; import java...
asked by 10.06.2018 / 21:27
1
answer

How to use ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE in hibernate?

I comment, I'm working with hibernate 4.3 in netbean with SQL connection and in my database I have the following table: USUARIO( ID_USUARIO VARCHAR(08) NOT NULL PRIMARY KEY USU VARCHAR(12) CLAVE VARBINARY(8000) ) Before working with hibe...
asked by 10.06.2018 / 17:22
1
answer

Show attributes of an array through a menu in Java

In the procedure of searching for data, I search with a name to show the address, and it only shows me the first company entered, if I look for number 2 or 3 it tells me that there is none with that name. Any idea why this happens? Data Clas...
asked by 30.05.2018 / 11:47
1
answer

Create file with system date and time?

good will see try to create a file where you will write the data of a client and the pet but I already do it in one method and the problem is that everything was stored in the same .txt and when entering several clients and pets are confused for...
asked by 21.05.2018 / 00:54
0
answers

How can I relate a class called Registration with a class called Parkig?

As I mentioned, I am new to programming. Working on the same project already outlined in the Parking, I am presented with the problem of creating a "Registration" class whose function is basically to have methods that allow registering the en...
asked by 20.05.2018 / 22:52