Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI & Swing

 
Alex Gregory
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.
 
Sai Prasad
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac 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
Sheriff
Posts: 17278
6
IntelliJ IDE Mac 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?
 
Eduard Jodas
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic