This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Event Handling

 
Greenhorn
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.
Dave
 
My cellmate was this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic