Thomas Suer

Ranch Hand
+ Follow
since Sep 03, 2001
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Thomas Suer

Originally posted by Lasse Koskela:
Have you seen this thread posted not a long ago on our J2ME forum?


Ooh, not really. Thanks for your hint!
Till now I'm using JBuilder and the MobileSet. But I don't like JBuilder as I like Eclipse...
Let's see...
Does anyone know if there is a Mobile Set plugin for Eclipse like there is on for JBuilder?
[ August 20, 2003: Message edited by: Thomas Suer ]
A good place to take a look at is
Swing Examples
For your problem you should keep an eye on the UIManager and its lookup table. For instance you could make the following invocation at startup of your app (that is before anything is displayed):

or at runtime you do the same stuff and additionally do an on the desired combo box. The last step is necessary to update the already instantiated combo box.
This should work
21 years ago
Hi Reehan!
One event is fired when the user presses the mouse button and starts his selection. For every selection change he makes (by dragging the mouse) during he still presses the mouse button another event is fired. And finally when he releases the mouse button a last event is fired.
To find out if you got the last event use the method 'getValueIsAdjusting()' which returns false if the selection is finished. So all you have to do is to implement an if statement that recognizes this value:
public void valueChanged(ListSelectionEvent e)
{
if (e.getValueIsAdjusting())
{
System.out.println("selection finished");
}
else
{
System.out.println("selecting...");
}
}
Hope that helps
Thomas
22 years ago
What about disabling the button immediately after the user clicks on it the first time? And after executing the task you could enable the button again...
Hope that helps
Tom
22 years ago
You also could add a FocusListener to your textarea and handle the enabling mechanism of the desired buttons when the textarea gets the focus. This would have the advantage that enabling the buttons also would take place if the user navigates to the textarea via the keyboard...
Good luck
Tom
22 years ago
Hi there!
I've a problem/question regarding a JScrollBar. I want to modify the width of the JScrollBar of a JComboBox. I've tried to set the UIManager's property 'ScrollBar.width'. This only works fine for the Metal L&F, but not for the Windows L&F and I have to use the Windows L&F.
How can I achieve this for the Windows L&F? Any suggestion would be appreciated
Many thanks in advance
Tom
22 years ago
My favourite swing book is "Definitive Guide to Swing for Java 2" from John Zukowski...
Here's a similar request in this forum: http://www.javaranch.com/ubb/Forum2/HTML/002727.html
Bye
Tom
22 years ago
Make sure that you have set the selection mode of the table's ListSelectionModel to 'MULTIPLE_INTERVAL_SELECTION':

I haven't tested it, but it should work...
Good luck
Tom
22 years ago
Please try out this site:
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
Maybe you find an appropriate example...
Tom
22 years ago
Hi there!
I've a problem/question regarding a JScrollBar. I want to modify the width of the JScrollBar of a JComboBox. I've tried to set the UIManager's property 'ScrollBar.width'. This only works fine for the Metal L&F, but not for the Windows L&F and I have to use the Windows L&F.
How can I achieve this for the Windows L&F? Any suggestion would be appreciated
Many thanks in advance
Tom
23 years ago
What about using the JList's method
?
Tom
[This message has been edited by Thomas Suer (edited November 09, 2001).]
23 years ago
Hi Daman!
I've found two errors in your code. You wrote both times

but to correct this isn't the solution to your problem.
First remove the columnWidth and fireTableChanged methods out of your table model class 'CoreReturnTableModel', you don't need to do so.
I did a mistake when telling you to use the setWidth() method for sizing the table's columns, sorry!
To correct this replace the setWidth() method calls by setPreferredWidth() method calls in your dialog's method 'getScrollPaneTable()'. It should work then.
Please note that the min width of the table columns is 15. So if you like to set the width to a smaller value, as you did, please take a look at another thread of the swing forum here at javaranch: http://www.javaranch.com/ubb/Forum2/HTML/002780.html
There I described the procedure.
Good luck
Tom
[This message has been edited by Thomas Suer (edited November 09, 2001).]
23 years ago
Try something like

Good luck
Tom
23 years ago
I think the only way is to create a 'large' insert statement of the following form:

Tom