• Post Reply Bookmark Topic Watch Topic
  • New Topic

Event Handling  RSS feed

Dave McCarthy
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone let me know if this is an acceptable means of event handling for the developer project.
This is what I have proposed:
Whithin a class which houses my jtable, I will also have a search button and combo boxes etc. I will implement ActionListener in this class. From the actionEvent method I will pass the event as a parameter to my controller class (model-view-controller approach on my jtable) which will carry out the action, ie. searching, booking etc. The controller will then make the appropriate changes to the tablemodel and notify of this (using the observer/observable pattern).
Oh, I also am having a slight problem with displaying my JTable. I am currently placing my jtable in a jscrollpane. The problem is that if i set the size of my columns, the size of the jscrollpane remains the same, thus requiring scrolling to view all columns of the table. I've tried all sorts of different things with this but the size of the scrollpane remains the same. I would like to be able to view all colums at the same time. I'm considering just placing the table in a panel alone and then creating a JTableHeader.

Any tips on any of this greatly appreciated.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!