DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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?

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links