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

how do I make a single cell of the second column to accept different data types ?!!

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have a JTable with 2 columns, there are other attributes of the JTable which are hidden from the user. Now,the second column values depend on all these other attribute values. For eg, one of them is a boolean, the other is a IPAddress value and the third a Date/ Time value. Depending on these values passed, the second column should be able to set its data.
Now what I need to know is :
1. I need to set up a combobox in the second column for the date/time attributes. How do I go about to do this ?!!
2. How do I manipulate the TextField of the JTable such that it can accept the format of an IP address ?!!
3. How do I get to set up a checkbox in the 2nd column if the dependent attribute is a boolean value ?!!
Basically, how do I make a single cell of the second column to accept different data types ?!!
Your help and suggestions are greatly appreciated !!
Thanks
Meghna
 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Meghna,
Read this excerpt from Brett Spell's book "Professional Java" and I guess it would help you answer your questions.
http://www-106.ibm.com/developerworks/java/library/j-jtable/index.html?dwzone=java

Thanks,
-hm
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic