• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

GUI problem : Refreshing Frame view

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Structure of Code ( Architecture ) is as given below -
Client starts off with command line argument to decide LOCAL or REMOTE
There is an adapter implemented by classes for Local and Remote implementations - i.e., Local speaks to Data class object directly as it resides on the server side whereas Remote created an object of the Client side networking class which creates socket to communicate with the server.
The main Client class also instantiates a class ( say PanelCombo class)which delivers a Frame , 2 Combo Boxes ( populated dynamically ) and 2 buttons for "SearchFlight" and "Exit" . This class has anonymous class Action listeners for the 2 buttons. When Search flight is clicked the Origin and Destination airports are put in the String Criteria and put in a method called "searchFlight(String criteria)" which calls the criteriaFind of the Data class.
This returns a DataInfo array which is put in the constructor of another class( say PanelJTable ) which creates the Jtable. The PanelJTable class creates a Jtable, puts it in a JscrollPane then puts it in a Jpanel and then add this Jpanel to the Frame of PanelCombo.
So on screen you see a Frame with the ComboBoxes and Buttons -- then a Jtable gets added to it in the Center.
This Jtable is refreshed by calling the constructor of the PanelJTable class each time.
PROBLEM :Everything works fine - but when I resize the window the table display goes haywire - it does not refresh automatically to display a clean table _ What could be the problem ???
I have use Abstract Table Model for the Jtable.

------------------
 
Shailendra Guggali
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO
Where / how do you use validate() ??
Also I was wondering if we need a ComponentListener with repaint() method???
shailendra
 
Your buns are mine! But you can have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic