• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want help with display

 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application which is okay butI am feeling problem with setting its top level panel jPanel1 which is added in North of the frame.

Now jPanel1 is the main JPanel which has a gridlayout of 4 rows.
it contains 3 Jpanels namely jpanTop1, jpanTop2 and jpanTop3, and a new JPanel() as the fourth element. It is added to JScrollPane topScroll, that in turn is added to Jframe Center and finally jPanel2 which holds buttons in the South.
Please note that if you don't added resultPanel to jpanTop3, the display is okay. I have yet to added functionality to limit ResultSet to 10 or specified no of records.

What I want is to shape upper (North) of the JFrame so as to beautify it...

The classes are GridTable.java and ResultsModel.java. You may download these files and help me with this.

It also had some other problems which I overcome regarding SQL and Model which I will discuss later...

Thanx,

Maki Jav
[ January 29, 2006: Message edited by: Maki Jav ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is a classic example for not using gui builders.

post a demo program of just the gui with the components, no actionListeners,
no connections, just the frame and the displayed components.
(it should be no more than 100 lines)
 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well! here it is.

It is not as small as you wished but fully commented so as to guide you fully. The problem lies between line nos. 102-149 ie in the top third row where I was trying to add a functionality to restrict records.

Thank you for helping me...

Maki Jav
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see if this is any closer to the display you want

 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is almost....

but what happened to that border for number of records?

Maki Jav
[ January 31, 2006: Message edited by: Maki Jav ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
instead of a titled border, I changed it to a label id'ing the radiobuttons etc

if you want it to look similar to the items above, add this line
recordsPanel.setBorder(BorderFactory.createEtchedBorder());
 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that titled border giving problems or what?

Thanx,

Maki Jav
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Is that titled border giving problems or what?

not at all.

my code is my thoughts in response to this:
> What I want is to shape upper (North) of the JFrame so as to beautify it...

simply add it back.
 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your effort, i appreciate it.


Maki Jav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic