Lena Solomonik

Greenhorn
+ Follow
since Aug 17, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lena Solomonik

I wrote an application that has a 'Print' option. It is printed fine on my printer, but when I try to print it through a printer on a different network, only one out of two pages is printed, because the printer prints a flag page first. I guess it counts my first page as second after the flag page. Why it's doing that? How can I fix it?
Thanks in advance.
Lena
22 years ago
Lon,
I think I misunderstood you first time.
You can create a class that extends from MouseAdapter and set it up so it would listen for a mouse click only. That way you can detect when user clicks on a checkbox. You need to pass the class to a table.addMouseListener(mouseAdapter) method.
I had an example of it somewhere, but I can't find it. Sorry
I hope it will help.
Lena.
22 years ago
I would create an object that will represent each row in your table. One of its instance variables would be a Boolean variable that would represent a checkbox column in your table. Also create access methods for this class (get() and set()). When you call setValueAt() of a class that implements AbstractTableModel (you need to have one), you call set() method for Boolean variable of your object. If you need to detect when value of a checkbox is changed, you call get() method.
I hope it's not too confusing.
Good luck.
Lena.
22 years ago
Hello, everyone!
Here is my problem.
I am trying to print a data from my JTable. I want the data to be displayed on whole page, but it's always printed with 1 inch margins. How can I fix it?
Thank you,
Yelena
22 years ago
Hello, everyone!
Here is my problem.
I have a table. When I change data in the table, a method of the session bean is called, which in turn calls 'set' methods of entity bean. When I call 'get' method after that, it displays a new data. But changes are not saved in the table. It means that they are not saved in database.
Has anyone had this promlem before?
My code looks as follows:
Travelcondition tc = travelconditionHomeRef.findByPrimaryKey(data.id);

switch(col) {
case 0:
tc.setDisplayOnReport((String)value);
log("Succeeded: set_tc(case 0): new value: " + tc.getDisplayOnReport());
break;
case 1:
tc.setDistrict1((BigDecimal)value);
break;
case 2:
tc.setCorridor((String)value);
break;
case 3:
tc.setLocationName((String)value);
break;
case 4:
tc.setRestriction((String)value);
break;
case 5:
tc.setComments((String)value);
break;
case 6:
tc.setConditions((String)value);
break;
case 7:
data.update = (Boolean)value;
default:
System.out.println("Invalid value entered");
}//end of switch
Thanks a lot.
Lena