robyn byrd

Greenhorn
+ Follow
since Oct 26, 2005
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 robyn byrd

I have a GUI consisting of a JList and JButton. The JList displays text items in black. When an item is selected the background color changes to red. I want to have the color of the selected text change to white when the user clicks on the JButton. In other words, the text color for the (already) selected item should change without requiring the user to click on the text item again. Can you show me how to accomplish this?
Thank you.
17 years ago
Can anyone tell me how to create a JTable column header that spans multiple adjacent columns? If this is not possible, can you tell me how to simulate this?
Thanks for your help.
17 years ago
I have a JTabbedPane with black tabs and white lettering on the tabs.
I am using UIManager.put("TabbedPane.selected", Color.green) to change a tab color to green when it is selected. The lettering remains white, but I would like it to change to black when the tab is selected. Is there a way to do this?
Thank you.
17 years ago
Craig:
Thanks very much. That did the trick!
Robyb
17 years ago
I am progammatically expanding a JTree but the last most nodes do not expand. I'm using code I found on this forum: tree.getRowCount(), tree.expandRow(i), etc. I've also tried expandPath, but the problem remains.

I'm building a tree that looks like this:
root
|
- S1
| |
| - A1
| |
| - A2
|
- S2
|
- A3
|
- A4
First I create node S1 and add to root. Then I create node A1, add to S1, then create A2 and add to A1. Tree appears expanded during these operations.
Then I create S2 and add to root. No problems. However, when I add A3 to S2, node S2 is not expanded. When I add A4 to A3, S2 remainds collapsed. Can anyone tell me what's happening and how I make all rows of the tree to be expanded when new nodes are added. I notice that tree.getRowCount() returns 3, so it doesn't seem to count rows for the 'A' nodes.
Thanks for your help.
17 years ago
I want to be able to color individual words in a line of text (syntax highlighting). This can be done with JEditorPane because it supports rich text format, but I was unable to find a way to do this using an ordinary JList. Could this be done with a custom JList renderer?
18 years ago
Situation:
JFrame contains a JPanel having box layout
JPanel contains JList on left, JEditorPane on right
JList is created to show a column of integers, 0...99, which must be selectable (that's why they're in a JList)
JEditorPane display lines of rich text format read from a file

Intent:
to align each integer in the JList with each line of text in JEditorPane

Problem:
even when font sizes are adjusted, the spacing between lines of text doesn't match the spacing between integers in the JList. Is there a way to adjust the line spacing of the rich text read into the JEditorPane? Is there any other way of achieving the above intent?

Thanks in advance.
18 years ago
I have a JList whose contents are obtained by reading a plain text file. I would like to be able to use a file containing rich text. Is there a way to display rich text in a JList?
18 years ago
I'm writing an app that allows me to drag a blue square (JPanel) on a canvas (another JPanel) and drop it at another location on the canvas. The dnd works, but I would like to know if there is a way to change the dnd cursor to a hand during the drag and return to the normal cursor when the drop occurs.
Thanks in advance..
18 years ago