• 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

Passing objects

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I have created two classes that extend JPanel. These JPanels are placed on a JTabbedPane. One of these classes represents a 'Project Maintenance' tab. The other represents an 'Order Maintenance' tab. These two classes each have a combo box on them that contains project ID's. I want to be able to re-populate the data in this combo box on the order maintenance tab whenever a user has pressed the save button on the project maintenance tab, and there were no errors.
The main class that creates the JTabbedPane, also creates the ProjectMaintenance class and the OrderMaintenance class. I thought I could just pass OrderMaintenace into ProjectMaintenance, and access it that way, but I get a runtime error when I do this. (ClassNotFoundException). In the code, OrderMaintenance is created before ProjectMaintenance so I thought it should recognize it. However, if I switch the order that these two classes are added to the JTabbedPane it works. But I don't want OrderMaintenance before ProjectMaintenance on my TabbedPane.
Does anyone know of a way I can do this?
Here is the code for my main class..

 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could someone move this topic to the AWT/Swing folder?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only if you promise to solve the problem.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To The Swing / JFC / AWT Forum...
 
reply
    Bookmark Topic Watch Topic
  • New Topic