Questions tagged as 'java'

1
answer

Show data of a Jlist

I have a jList with items (These items are the id of a SQL table, See Image) What I intend to do is that every time you click on an item in the list, the name of the Id (SQL statement) is displayed in a jtextfield. But every time I click on an e...
asked by 10.02.2018 / 02:21
1
answer

JavaScript doubt: clutter array with loop

I am doing an exercise for a job and I have a problem when messing an array. That is, I have an array called "numbers" and a function that messes up. Then I create an empty array called "disordered numbers" which I will fill with three positions...
asked by 12.05.2018 / 16:15
1
answer

Duplicate similar objects to contain different data?

Context I have a somewhat complex structure of classes that resemble a tree in this way. Quotation Processes Activities Machines Expenses So I can have something like this: Cotizacion1 Proceso1 Relacio...
asked by 11.05.2018 / 18:07
1
answer

Why does trying to change a variable inside a TimerTask give me an error?

On line 13 ( sleep = true; ) tells me the    Syntax error on token "sleep", VariableDeclaratorId expected after this token. import java.io.IOException; import java.util.TimerTask; import java.util.concurrent.Executors; import...
asked by 12.05.2018 / 19:46
1
answer

Go through a ResultSet of objects that have another object as an attribute

The problem is that I create objects of class Car that have as an attribute an object of class Motor, when going through the resulSet of the query I have printed the data I can not do it well. In the database there are saved 2...
asked by 04.04.2018 / 15:35
1
answer

Compare the data of a matrix with a character

I'm starting to program in java, novice in this language, I'm doing a cinema seating assignment program, which I'm doing with a matrix of dimension 6, but when comparing the matrices with a character it performs well but I enter || (or) to compa...
asked by 09.02.2018 / 15:27
1
answer

Group 4 in 4 in Java

I want to group the elements from 4 to 4 in java. Each question has 4 sub-questions, so those 4 sub-questions belong to you. String[] preguntas = request.getParameterValues("pregunta[]"); String[] subpregun...
asked by 11.03.2018 / 22:08
4
answers

How to find two characters in a String

I have x number of students with their names and notes, all this I'm going through in a For, but of these students I need to show the number of names that start with A and end in S (I can not include arrangements, please go to the most basic)...
asked by 13.03.2018 / 03:05
1
answer

Problems with ImageIcon

Hello this is the exercise 9.8 of How to Schedule in JAVA of Deitel Edition 10 I can not see the icon "GUItip.gif" displayed This is how the GIF is stored Here next to the two labels should appear the gif this is the GIF i...
asked by 10.03.2018 / 19:06
1
answer

Because the same project does not run in glassfish 3, but in glassfish 4 if it does it correctly?

Currently I have a project that is mounted on a server glassfish 4.1, but for some external reasons it was decided to use the glassfish server 3, the situation is that the same project without modifying absolutely nothing works only in glassfish...
asked by 06.02.2018 / 17:14