Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Ramses Butarbutar

Ranch Hand
+ Follow
since Jun 16, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramses Butarbutar

Rob Camick wrote:

It should only affect one row. Each data in each row is independent of the data in all other rows.

Sorry for my late reply rob..

What i wanna say here is i can not change the state the next row.
For example there are two row data.. i can check or uncheck the checkbox of first row but i cannot change the state of next row, i cannot click the checkbox. Is there some explanation about this???


12 years ago
I made some exercise to show checkbox in a table using mysql for it's db.
in main class i use code to retrieve data onto table like this :

and TableUser class :

My problem is the table show checkbox for each data and i set true for it in checkbox. But when i unchecked, it's affect only one row, and i can not change the state other row.. would you tell me guys my mistake here.. any comment or a clue how to fix this..

Thanks alot

Best regards
12 years ago

Rob Camick wrote:Its more complicated than that. You need a custom renderer and a custom editor.

The Table Button Column entry can help you out.

I've read your clue.. So what you have written in your class is basicly to specify column that is used to contain the button so renderer and editor can perform invoke action based on row number of clicked button...
Hmm... great thought...
What that i want to point in my previous message is to handle what DefaultTableCellRenderer can't handle if return value is we have to customize to get getTableCellRendererComponent() which returns a java.awt.Component that knows how to draw the contents of a specific cell.
To maintain the column is the job of TableCellRenderer, it will return same component for every cell of the column..
I think that the simply way to implement a button in a table..
12 years ago
Hehe.. sorry all, I'm too lazy to think today...
I just remember what i need to display a jbutton in a jtable..
I have to make my own TableCellRenderer, get component which return component as the renderer.. and next step is to make TableModel that implement the return because DefaultTableModel is designed to work with "DefaultTableCellRenderer" that return string...
And final step is creating buttonmouselistener for action..

Thanks guys for your attention..

12 years ago
Hi all, ,

I made a sample testing class of JTable.. and create each data as object based on columnNames.
And i want to put a button in JTable but it's doesn't work.. only show up text(javax.swing.JButton..).
How can i do this.. put a button into JTable??


12 years ago

Jeanne Boyarsky wrote:Ramses,
Are you thinking of an updateable resultset maybe?

Hi Jeanne,
Hmm.. i'm not sure.. let me describe what i got here..
There are 3 tables.. part master, part detail, stock. One item subject in part master contain
several item parts.. So when parts came in to warehouse, it should insert part detail based on each subject in part master table.. After that it should automatically update stock table..
e.g. subject A has 10 item ( B - K ).. And i should check each row , write to part detail and based on
each row , update data in stock.. We have more and less 200 subject and each subject contain more and less 30 item parts.. And all transaction daily..
I hope you can get what i mean...
Any suggestion on that jeanne??
Anyone know or used to implement cursor in DB2. For update for each row in table, i think
i need cursor to implement this. I've asked uncle Google for this, but he has no answer..
Could you guys show me how to use cursor in DB2 or comment on any knowledge about this.



Bryan Peach wrote:When I do that and Initiate the frac1 and frac2 in the main method I get compile errors from all the different methods saying they can't find the Values for frac1 and Frac2. The only way it will compile for me is when i have it where it is.

Is it?? Hmm.. i re make your code like sample below.. I don't know why you say you got errors when you put on main method? Could you explain it??

12 years ago
Howdy Nathan, welcome aboard...

First... i'm so confuse what's the point of your topic...
Seem you need the code for your matter... But Nathan,here you can't ask someone to make code for you.. We are here to find and discuss the best solution for people question.. We will guide you if we know..

Here the sample.. if you hard to figure it out.. just ask which part makes you confuse..
12 years ago
Hi Bryan Peach,

Why you initiate this in beginning? what for?

static Fraction Frac1= new Fraction(1,3);
static Fraction Frac2 = new Fraction(2,5);

Just initiate when you call it.. It will replace with the latest value if you
initiate that from beginning...

try this..
12 years ago
Hi Ana,
I have a great LINK to learn java swing... It show you how to use layout manager and etc..
Just sit back, make some coffee (java coffee ) and check out the link..Have a nice study..

12 years ago

Ana Suvari wrote: Can someone try my game again and let me know the result?
Please check for me. I would really appreciate some feedback. Thanks in advance.

Hi Ana , when i follow your instruction, i got this message when i open the site..

seem , it's cause by different class version. just like sheriff said before..
I'm using java version 1.6 update 16. So i can't get into your game...
12 years ago
Welcome aboard Mehul,

Based my experience make some thing like this , you need to define functionalities into xml code. So you can combine each level according which node that represent the level. After that you can display it where ever you want (jsp, gui) which some rules hierarchy (the workflow).. If you use a database in this application, you don't need to hard code it.. just define relation in each level into some table, you can manage it later to change it.
If you ever seen SAP-HR, the approval process seem likely what you want.

is there any tool which according to the type of entry into the application decides the future workflow?

BTW, I still don't get what you mean by any tools decide the workflow.. is it by instantly that what you mean???

Best regards,

12 years ago

Maneesh Godbole wrote:In essence, you need to sign the jar. When the applet is launched, the user will be asked to confirm if it is OK to allow the applet to read the file.
More details here

Once the user agrees, just treat it as simple file I/O. Open stream, read contents, do stuff, close stream.

Thanks Maneesh,

I will do your suggestion and learn about this signer applet first and it characteristic to give the access. If you don't mind maybe next thread i'll ask your comment for applet what i want to make.
And maybe if you found other way to do this.. please give me news.. I really appreciate it..

Thanks to you too Adam for responding..

Best Regards,

12 years ago
Just share..
I hope this function help you more to understand how to interpret as a regular month number.
12 years ago