How to read a hashset and put in jtable?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to read a hashset and put in jtable?

  1. #1
    Join Date
    Sep 2004
    Posts
    59

    How to read a hashset and put in jtable?

    Code:
    TableModel jTable1Model = new DefaultTableModel(new String[][] {
    						{ "Speler", "Won/lost" ,  "Amount", "Game" } }, new String[] {
    						"Column 1", "Column 2", "Column 3", "Column 4" });
    
    				jTable1 = new JTable();
    				
    						
    				jTable1(gme.getUsers());
    gme.getuser is a hashset that contains all users, how do i return this in the jtable?
    My own java video tutorials, feel free to watch it.
    http://www.engineeringserver.com/for...amming-b311.0/ Need java help? For beginning and intermediate java coders!

  2. #2
    Join Date
    Feb 2006
    Location
    Cologne - Germany
    Posts
    271
    as i can see, there is no support for sets in the jtable classes constructors,
    but for arrays.
    i suggest you implement your own tablemodel.
    how does the data in the set look like?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center