Need JTable help....

C

confused

I'm using a jtable in an applet and my cells have to have the ability
to have a lot of data in them (sometimes paragraphs of comments,
sometimes only one word or number). Instead of increasing the cell
size of each cell to fit the cell with the largest amount of data and
wasting space on the jtable, the team that I work with made the cells
editable and once clicked on the cell would display a vertical scroll
bar and the data could be scrolled to and be editable.

This worked, but is not functional in that the cell is not large enough
to accomodate large amounts of data and be easy to read/type in. So,
the team decided to pop up a dialog over the cell that was clicked
making the data easier to read and edit.

2 things we would like to be able to do now.
1) Popup the top left corner of the dialog over the top left corner of
the cell that was clicked to make it appear that the dialog has grown
out of the cell like a drop down menu.

2) Is there a way to take the "grown out of the cell" idea to an even
higher level? Can we make the cell appear as if it comes out of the
table in a 3-D type manner for the user to read/edit the data.

There are many other things that the eventual dialog must be able to do
such as display calendar's to select dates, display multiple choice
answers in a radio button format, and have several other buttons to
jump to different portions of the application. I guess what I'm saying
is that the original editable cell never was going to be able to
accomodate all of the things we needed to do.

Thanks in advance for any help.
 
C

confused

Ok...we figured out part 1 of our question by doing the following.

Rectangle rect = scrollTable.getTable().getCellRect(row, column, true);
Point pnt = rect.getLocation();
SwingUtilities.convertPointToScreen(pnt, scrollTable.getTable());
JDialog jd = new JDialog();
jd.setLocation(pnt);

Now we are looking for brownie points. Does anyone have any cool
suggestions on how to present dialogs. It would be even better if we
could do something where a dialog isn't used. Maybe have a drop down
combo box that has a panel in it or something like that.
At this point we are taking any/all suggestions : )
If you've done something like this please post some code so we can have
a head start.

Thanks!!!!!!!
 
T

Thomas Weidenfeller

confused said:
Now we are looking for brownie points. Does anyone have any cool
suggestions on how to present dialogs. It would be even better if we
could do something where a dialog isn't used. Maybe have a drop down
combo box that has a panel in it or something like that.
At this point we are taking any/all suggestions : )

PopupFactory and Popups.
If you've done something like this please post some code so we can have
a head start.

Can't you guys at Healthcare Management Systems write your own code?
This group is not a free code mill. Oh, and there is a reason why there
is a separate gui newsgroup.

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top