File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Looking for a table component simpler than JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Looking for a table component simpler than JTable" Watch "Looking for a table component simpler than JTable" New topic
Author

Looking for a table component simpler than JTable

Esmaeil Ashrafi
Ranch Hand

Joined: Feb 22, 2010
Posts: 73
Hi there,
I have an application, and somewhere i want to show a message that would contain a table (generally meaning).

I am using a JOptionPane as the dialog and want to have a table i attached its picture.

The matter is no modification required to the table, just as a message to the user to confirm the informations contained within it.

Well now, i think JTable would be a more complicated component and has its own situations to use!

Some approaches i can guess is to using panels for each cell and make lined border for them !

What's your suggestions?


Thank in advance


[Thumbnail for table.JPG]


I'm really tired of being engaged with stuff other than Java and programming

Wish to get back soon to my love...
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2182
    
    7
What's your suggestions?


Use a JTable, there is no need to reinvent the wheel. Add the table to a scroll pane and add the scroll pane the the option pane.
Esmaeil Ashrafi
Ranch Hand

Joined: Feb 22, 2010
Posts: 73
Rob Camick wrote:
What's your suggestions?


Use a JTable, there is no need to reinvent the wheel. Add the table to a scroll pane and add the scroll pane the the option pane.

Hi Rob,
Honestly i didn't use JTable before. Of course it is nice having to learn how to use that, but in some programs i saw there is capability of editing cell contents; while i don't want this. So is it possible,? if so, i will go through tutorials and documentations.

Thank you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41843
    
  63
Yes, it's possible to turn off editability of JTables.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Looking for a table component simpler than JTable