Questions tagged as 'java'

1
answer

Function of postgres executed from java

I have a function in PostgreSQL that takes 6 values, the first one character varying , the next one an integer and the remaining 4 are of type numeric . I call it from Java in the following way: preStmt=con.prepareStatement(...
asked by 25.09.2017 / 20:02
0
answers

remove project webservice with eclipse

Hello what happens is that currently I have to change in my java project from one webservice to another, what I want to know is if anyone knows how to delete the previous webservice in order to add the new one that can explain me? note: I use...
asked by 31.08.2017 / 13:59
1
answer

Duplicate files when reading text file line by line with java

My questions is Why, when reading a file .txt , do you duplicate the lines contained in my .txt? That is, if I have a String variable which I read, for example . Juan, Pedro, so-and-so. If I show on screen what is loaded in that variable...
asked by 05.09.2017 / 19:13
1
answer

How to separate a text string by means of a space? [duplicate]

In my code: String nex = keyboard.next (). Split ('/ n'); (Keyboard is Scanner type) How can you identify the space in the .split () and the end of the string.     
asked by 30.08.2017 / 01:55
1
answer

java.lang.StringIndexOutOfBoundsException: String index out of range: - 1

I have the following error when wanting to read content from a .txt file and compare it with the contents of an ArrayList which I do: public void leer(ArrayList<String> arrayList) { try { // Abrimos el archivo con la...
asked by 30.08.2017 / 02:01
2
answers

Use date class in Java

I have made a class date but when I try to visualize the day, month and year those that are initialized in the constructor appear and not those that I enter by keyboard, I visualize it by means of the toString () method Class code date: pub...
asked by 26.08.2017 / 12:02
1
answer

I can not get my Java button to show inside my JFrame

The problem is that I have the JFrame and it is perfect, with its title and others. When I try to instantiate a button, it does not appear in any coordinate that adds it. package neuronaia; import javax.swing.*; public class Main...
asked by 07.09.2017 / 18:48
2
answers

Read a text file and compare its contents with an arraylist in java

My questions is as follows, how can I compare the content of a text file with the content of an arraylist? For example: I have a method that performs a search of files in a specified folder and lifts it in an arraylist, which would need to know...
asked by 27.08.2017 / 18:54
1
answer

How to start a Java project with a closed JxTaskPane?

I have several JxTaskPane in a java application and I would like to know how to make the JxTaskPane to be closed when executing it I already solved it in case some Christian needs it. JxTaskPane has a setCollapsed method that receives a boole...
asked by 27.08.2017 / 17:52
1
answer

how to put a separator in a jtable java, or that a cell occupies all the columns

I need to put subtitles inside a jtable something like in the image: [! [enter the description of the image here] [1]] [1] Does anyone have any idea how it is done?     
asked by 29.08.2017 / 17:09