-
Java GUI help
Hi
Could anyone tell me what GUI components can i use to display student details in a grid cell? Lets say i wanted to put like
First name: studentName
Last name: studentLastName
DOB: studentDOB
So these three details to be placed in one grid cell and in another grid cell the same details just for different student and so on for a total of 8 students. The grid view is 2 rows and 4 columns. By the way i am taking the student info from a model already implemented.
Could you help me with this?
Appreciate any help. Thanks
-
Re: Java GUI help
Have you looked at the Tutorial?
Go to this site and Find GUI
The Really Big Index
There are several layout managers that build a grid. Their class names begin with Grid
-
Re: Java GUI help
Looks like you need to use a GridLayout. It's the easiest layout to use if you want a grid. To display the text, you can use JLabels or JTextAreas. I recommend JLabels as they are easier and look nicer for what you are trying to do here. Just add them one by one to your JPanel and the layout will align them correctly for you.
-
Re: Java GUI help
Hello needJavaHelp,
I think using JTable is best approach. The table will have 3 columns and 8 rows which correspond to 3 fields and 8 students.
immutable objects