Ok thank you a lot man , I will try to solve it . Thanks so much for helping .
Type: Posts; User: ahmed2009
Ok thank you a lot man , I will try to solve it . Thanks so much for helping .
No now I used one class only , and this is the whole code : (can you please tell me where to change to make the layout looks like in the above picture ? ...
package averageprogram;
import...
You must understand first I was used two classes one for the main and one contain all the JFrame components , after I use one class (the main inside it )
this problem happened ...
Ok now it's show all the elements thank you , but there is one more problem the style if the program is changed look before :
https://i.imgur.com/01w485N.png
and after : ...
Nothing happened, If I add these code in the main method it show me there is error :
cp.add(panel);
cp.add(panel1,BorderLayout.SOUTH);
panel.add(label);
...
Can you help me more , I don't get it really .
I write this in the main method ?
AverageProgram test = new AverageProgram();
and what's next ?
I use only one class , why I should create an instance ...
It really take so much time for me to wrote it . sorry for bad formatting .
If you copy the code and paste it , and run it , it will show only blank form without any elements . I don't know what I...
I write this code in one class but it doesn't show any elements ( button , labels ) all elements , but when I put it in two classes one the main and another one it works fine .
Here is the code :...
Everything is solved now thanks a lot.
I just want when the user type in the text field it should be in the center like this :
https://i.imgur.com/3iWBlAj.png
Hello everyone ,
I know how to do this for normal JTextField but how to do this if it an array like this :
private JTextField[] userInput1;
I want everything typed in the center .