• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with gui

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
scrollPane1.add(op);//is wrong

read the apidocs for jscrollpane in particular the methods starting set...,
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And please don't use thread titles like "problem with gui"; nobody knows what that actually means.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic