aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Working with 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 "Working with Jtable" Watch "Working with Jtable" New topic
Author

Working with Jtable

Xie Liu
Greenhorn

Joined: Jan 09, 2009
Posts: 3
Hello,

I am java beginner and trying to write a Swing based application with an observer-pattern

When the user clicks on the button named "showTable" after giving two Object rows values in Min and Max textfields (min < max all the time), the values of the table between Min and Max become yellow. This works properly.

Now I need a help for the "showResults" button, this button need to work after giving four different Object rows values in textfields (with Min< Start < End < Max).
I want the botton "showResults" panel to show the results of all values gave in textfields and the number of values between Start and End (both values including), Min and Start (only Min including), End and Max ( only Max including) and Min and Max (both values including) in the created panel as "TableModel.

1st problem: I don't know exactly, if the implementation of my methods are okay.

2nd problem: I try to implemente the method actionPerformed of my button "showResults" in order to get results in the new panel as tableModel, but in vain.

Can anyone tell me, how can I do it correctly.

Thanks in advance for your help.

/****************Main******************/



/*******************Changer********************/


/**********************Updater**********************/


/*********************Listener**************************/



Olivier Legat
Ranch Hand

Joined: Nov 17, 2007
Posts: 176

Hi Petit Maitre and welcome to Javaranch.

You are posting far too much code, it would be to time consuming for anyone to go through that. Try be more specific when asking for help. Also, I don't fully understand what the Button showResult is meant to do, could you please reexplain in a different way.


Olly
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18991
    
    8

"Petit Maitre", welcome to JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted."
Xie Liu
Greenhorn

Joined: Jan 09, 2009
Posts: 3
Hi,

Thanks you for your messages,

We're a friendly group, but we do require members to have valid display names.
Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and correct your display name since accounts with invalid display names will be deleted.

I'm sorry, I correct all the things like you tell to me. All is now okay


You are posting far too much code, it would be to time consuming for anyone to go through that. Try be more specific when asking for help. Also, I don't fully understand what the Button showResult is meant to do, could you please reexplain in a different way.

I'm sorry of the length of my code, I promise to never post something like that the next time.
Back to my button "showResult", the user gives first the values in Textfiels and after clicking on it, it will display these values in the empty panel near the table panel as
- Min, Start, End, Max
In addition to the values above, it will displaying too the following values:
-Number 1, Number2, Number 3, AllNumber like staying in the class "TableTest4Updater"
But my Problem is how can I implement this in my main class, particularly in this fragment code
button2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {};
in order to obtain my above results displaying as TableMoedel in my empty panel.
I hope that my explanations are now clear.

Thanks,
XL
Xie Liu
Greenhorn

Joined: Jan 09, 2009
Posts: 3
Hi,


the number of values between Start and End


to be more precisely the number told above is the number of cells between the cell of the numbers given in the textfields as Start and End (Number1). The same for the Number2(between Min and Start), Number 3(between End and Max), AllNumber(between Min and Max).

Thanks for your Help,
XL

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Working with Jtable