Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

RMI & Swing

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, this is my first message to the group. I hope to be both helpful to others and appreciate help when I need it. Well, now I am stuck in a deep hole with the GUI. I set up a JTabbedPane with a JButton that when pushed selects the second pane, and in non-networked mode, this works fine, but in networked RMI mode, the button freezes(turn deep gray as if pushed inside), and wont do anything until I resize the frame with the mouse. Can someone please tell me what they think might be happening.
 
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why the user has to push the button to select the 2nd panel? I am not sure about the problem, but I think you should remove that button altogether.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"AlexGregory"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe his button is probably the Search button.
It sounds like after your data is returned fromt he remote call, the screen is not refreshing. It really depends on your method call to the server to get the data, and then what is your next call?
Mark
 
Alex Gregory
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, is there any reason why RMI would have problems with Swing?
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem may not be SWING vs RMI. SWING is a problem on its own.
Let me guess: once the search button is pressed, do you show a dialog? if you do, after closing this dialog, do you modify the GUI, ie to show the results to the user?
if not forget this reply entirely.
 
Alex Gregory
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, after search is pressed, the "Booking Panel" of the JTabbedPane is shown, and the Table is supposed to be updated. But, only the panel is shown, and when the Frame is resized, then the table is updated.
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the JPanel that contains the flight results JTable and the search criteria components in the same screen (ie..same tab in the JTabbedPane). It is better than taking the user to a different panel to show the results.
[ June 18, 2002: Message edited by: Sai Prasad ]
 
Eduard Jodas
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Sai.
But let me one more try: do you use a separate thread? Are you sure no exception is thrown?
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic