Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable

 
shubangini Dave
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My GUI runs like this.I've 2 main panels on a frame.Frame is set to BorderLayout and the main panels are added to the frame.
first panel set above on the frame is set to gridLayout.
The first panel has 4 subpanel having comboboxes ant textfield.
Problem 1) when the GUI is activated I get a blank screen and then when I resize the frame using window maximize(-)
I get the proper Layout comboboxes and textfield.
how to rectify this?
Problem 2) How to add a JTable to the second mainPanel?
tried many things but didn't work.
Do anyone faced with a similar problem address my query?
Thanks in advance.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

add the Jtable to a JScrollPane and then add the ScrollPane to the frame specifiyng BorderLayout.CENTER as the constraint. It worked for me , infact i have a very similar layout structure.
Okay intially try using pack() and then maximize. Hope it works.
I decided on a random setSize dimension.
karthik.

Originally posted by shubangini Dave:
My GUI runs like this.I've 2 main panels on a frame.Frame is set to BorderLayout and the main panels are added to the frame.
first panel set above on the frame is set to gridLayout.
The first panel has 4 subpanel having comboboxes ant textfield.
Problem 1) when the GUI is activated I get a blank screen and then when I resize the frame using window maximize(-)
I get the proper Layout comboboxes and textfield.
how to rectify this?
Problem 2) How to add a JTable to the second mainPanel?
tried many things but didn't work.
Do anyone faced with a similar problem address my query?
Thanks in advance.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic