Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Matt Hansen

Ranch Hand
+ Follow
since Jul 31, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Matt Hansen

JDialog uses the icon of it's parent. So, just set the icon of the parent.
18 years ago
You would need to add a trigger to the database and you would need to have a thread in your java app check to see if the trigger has fired. For example, you could have a trigger set a flag in your database and have a thread that checks for that flag every x seconds.
18 years ago
You can try this:
18 years ago
Okay, the problem is not in the paint method. The problem is that the paint method never gets called. I'm confused because sometimes it works but sometimes it doesn't. Any suggestions?
18 years ago
I implemented a tooltip by extending the BasicToolTipUI and overriding the paint method. Most of the time this works fine and I have multiple lines on my tooltip. But, sometimes when the tooltip appears centered (i.e. the mouse is in the middle of the tooltip) it shows up as an empty gray box.

[This message has been edited by Matt Hansen (edited October 04, 2001).]
18 years ago
In the getTreeCellRendererComponent in your DefaultTreeCellRenderer you know the row. So you can then just setBackground if the row is one that you want colored.
18 years ago
You could try adding this:

Also, if you implement ComponentListener you can catch the componentResized and update your image location.
[This message has been edited by Matt Hansen (edited October 04, 2001).]
[This message has been edited by Matt Hansen (edited October 04, 2001).]
18 years ago
You should be able to get a node from the path using TreePath.getLastPathComponent(). I believe it returns the node at the end of the path.
18 years ago
I have not worked with applets before. But, when I run this it runs the init method instead of main. Maybe this is normal for applets? Anyway, when I run your code in jBuilder5 the main method is never called so the look and feel is never set.
[This message has been edited by Matt Hansen (edited October 03, 2001).]
18 years ago
I'm not sure why but I moved createToolTip to the table instead of the cell renderer and now it works.
18 years ago
You just need to use a font that supports those characters.
18 years ago
In order to implement multi-line tooltip in a JTable I'm trying to extend the DefaultTableCellRenderer to override createToolTip to use my MultiLineToolTip. When I override createToolTip for a JButton it works fine and I can get a multi-line tooltip. But, when I try to override it in my extended DefaultTableCellRenderer the method never gets called. Any suggestions?
Here's my code (there's not much to it):
18 years ago
If you want the JLabel to store the url and display some different text. i.e. it says 'My Link' and clicking on it takes you to http://www.somewebpage.com You probably need to implement your own JLabel which has a url field and a getURL method.
[This message has been edited by Matt Hansen (edited September 28, 2001).]
18 years ago