I have problem when reading multiple lines from json.
Problem is when i start it, it calls out chooser to pick file to read, and after i click open, it reads only first value from file, and after...
I have problem when reading multiple lines from json.
Problem is when i start it, it calls out chooser to pick file to read, and after i click open, it reads only first value from file, and after...
I have my textfields which contains numbers, and i collected that numbers and place them into my json object.
JSONObject obj = new JSONObject();
String prvi = textField.getText();
int prvi1 =...
thx, i will do that, this upper was just testing, i'm going to do some changes later also
thx so much .. i finally got it, one of the problems was that my reader was written under void main,
so i created separate method called reader, made it string and taking one argument so i can use...
ok, it's done in a method. when i call it it will do the reading from the file, and create my variable.
i still don't know how to connect that variable with a textfield. any concrete suggestion, or...
I don't get it.
because my reading class at the end creates variable "age", and that variable has to be written into textfiled which
is created on my main class.
so i suppose i need add after...
can you write me a code, e.g. this is my textfield
textField = new JTextField();
textField.setBounds(142, 9, 127, 20);
Link_P.add(textField);
textField.setColumns(10);
...
change of plans ... i decided it is easier to use json not plain txt.
import java.io.FileReader;
import java.io.IOException;
import org.json.simple.JSONObject;
import...
ok, i'll try something tonight, is there a way to make a class which will be doing all of this, and when i call the class i give to it argument which line to use, because i will be needing to call...
I haven't worked before with I/O from txtfile, so i have problem with everything. I hate working with lines, but i have to. If you know code that will help me with my program that would be great, if...
I just posted my problem post earlier.
I have no clue how to read numbers from same txt file, to different textfields, and each number is on different line in txt. e.g. How to specify that in first...
The point is this.
978
On the picture, you can see what i have to do.
Numbers have to be written in txt file, and automaticly loaded when i open that instance of program.
When numbers are...
it's not the problem to pick number from the string. i could use it by simple reader, i was planing to use something like this
import java.util.*;
import java.io.*;
public class...
ok, thx
i will try something and post progress
First problem.
i know how to read whole txt, but how to read single item form line
e.g.
my txt file has 30 lines
line1 100
line2 200
.......
i have created a gui interface with 4-5 textfields ...
In txt file i have for example set to default
number1 100
number2 101
number3 10
i have to import numbers to textfield
100 to...