*
The moose likes Swing / AWT / SWT and the fly likes I want help with display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "I want help with display" Watch "I want help with display" New topic
Author

I want help with display

Maki Jav
Ranch Hand

Joined: May 09, 2002
Posts: 435
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 ]

Help gets you when you need it!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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

Joined: May 09, 2002
Posts: 435
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

Joined: Jun 09, 2003
Posts: 4632
see if this is any closer to the display you want

Maki Jav
Ranch Hand

Joined: May 09, 2002
Posts: 435
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

Joined: Jun 09, 2003
Posts: 4632
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

Joined: May 09, 2002
Posts: 435
Is that titled border giving problems or what?

Thanx,

Maki Jav
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> 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

Joined: May 09, 2002
Posts: 435
Thank you very much for your effort, i appreciate it.


Maki Jav
 
 
subject: I want help with display
 
Similar Threads
Running an exe file
C++ and applets
Problem with Batch
Codebase Again
Local host diffrence