This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem with gui Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with gui" Watch "problem with gui" New topic
Author

problem with gui

kartik rathore
Greenhorn

Joined: Oct 18, 2008
Posts: 14
hi,
i am trying to design a monitoring system for my university.

i have several files but i have only listed the files that i am having problem.

during the process of coding, i was trying to show a panel a scrollpane which was a success. the jscrollpane is in a jframe.
this jpanel has a jbutton. on clicking the button it should load a another panel into the scrollpane but it does not. how ever if i make a object of the main frame and then add to the jscrollpane and then show this frame it shows the jscrollpane with the new jpanel. but there is a problem. now i have 2 jframe showing.

how do i get rid of the original jframe or just show one jframe with the new jpanel in it

code is as under :---


i would also like to mention that i have some database connectivity being used her. thus i have attached my database.

i would be very grateful if any one could help and apolozise for any inconvienience caused
thanks

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Please Isolate The Problem. There is so much code it's really hard to know where to start looking.

In short, how do you change the contents of your scrollpane?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
scrollPane1.add(op);//is wrong

read the apidocs for jscrollpane in particular the methods starting set...,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
And please don't use thread titles like "problem with gui"; nobody knows what that actually means.
 
Don't get me started about those stupid light bulbs.
 
subject: problem with gui
 
Similar Threads
how will we move from one page to another within the same window in Swing?
How can i display minimize and iconifiable button in JInternalFrame
error regarding jdic
error sql after removing all jdbc connection
Line Spacing in jTextPane