Questions tagged as 'java'

0
answers

how can I refactor these methods in java?

How can I refactor these two methods public void iniciar1() { int numeroCasos = 0; int numeroDigitos = 0; int digitosConsecutivos = 0; int resultado = 0; int validar = 0; Scanner leer = new Scanner(System.in); n...
asked by 04.09.2017 / 00:56
2
answers

I can not record from Java in SQL Server

Good, I have a Web application in which the front end is javaScript and the back java, which connects to SQL Server, I have an SP which queries the data on a table, which if not generated a function, the question is that the web screen shows me...
asked by 04.09.2017 / 14:38
0
answers

Data truncation: Data too long for column 'codpre' at row 1 How can I fix it

Well as it says in the title it gives me that error when inserting data in my java database. It only gives me failure that is a varchar of 5 I put 5 and it does not work I put it less for example 4 and if it works for me, but I need it to work g...
asked by 01.06.2017 / 20:54
1
answer

Get value from a jTable with mysql and place it in a java spinner

Good evening, can someone guide me how to get the value of a joint and place it in a spinner? with the text fields I have not had problems, but with the spinner I do not even get an error message but I do not get the value of the row that has be...
asked by 30.05.2017 / 02:34
0
answers

File modification

This is the first time that I post in this place, I am a beginner in this of java and I had a small inconvenience when wanting to make a file modification. Well, what happens is that I want to make a file modification sending a window's label...
asked by 29.05.2017 / 20:05
1
answer

Problem with form, Window Builder Eclipse

I am trying to create a form to register a user using the Window Builder plugin with Eclipse, compile but at the time of entering the data and clicking on the "register" button, all the errors appear. The program does compile, but when you open...
asked by 30.05.2017 / 00:24
1
answer

Display data from an ArrayList in a DataTable in Java?

What I want to do is show the data that I put in my textBox on my page first I send them to a class called people, I keep them in a ArrayList and then I consult them to be shown by a REGISTER method that is in PersonaBean in a data...
asked by 30.05.2017 / 05:51
0
answers

Unable to import HttpServlet in IntelliJ Ultimate with JavaEE

I am trying to create an application with JavaEE in IntelliJ Ultimate. The plugin comes by default and is activated, but when it comes to importing import javax.servlet.* I do not see the library, does anyone know of any solution? Thanks....
asked by 30.05.2017 / 10:18
0
answers

ManagedBean, the attribute change does not persist

Greetings. I call a method of a bean to add an element to a private arrayList . It is added correctly, but when I call it again (ajax) to add a second element the arrayList is empty. It changes but does not persist. I guess it...
asked by 02.06.2017 / 11:01
1
answer

TextToSpeech delays in starting

When starting a Activity I execute the following code in the function onCreate : tts = new TextToSpeech(this, new TextToSpeech.OnInitListener() { @Override public void onInit(int status) { if (status == TextToS...
asked by 02.06.2017 / 17:04