Stefan Cosma

Greenhorn
+ Follow
since Mar 30, 2012
Stefan likes ...
Opera Java Ubuntu
Merit badge: grant badges
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 Stefan Cosma

Sorry about that, I didn't know about this! I will try to contain myself to only one forum/website.
10 years ago
This is what happens: In my main class I call a function updateUI() that updates some components after the UIManager changes the Look and Feel. This works perfectly on Windows and Linux, but on Mac it doesn't. So Mac doesn't update the UI of a component after I change the Look and Feel with the UIManager. Anyone got any suggestions.
10 years ago
Hello,

I have a problem and no idea how to solve it. How can I update the components on Mac OS.

On Windows and Linux I use but apparently it doesn't work on Mac OS. Any suggestions? Thanks.
10 years ago
I solved the issue. It was actually real easy. I replaced JCheckboxMenuItem with JToggleButton and set the Icon and the selected Icon on each of the elements, and it worked.

This is where I found the solution.

Thank you Darryl for all your help so far.
10 years ago
I have another question. How can I change the selected icon for the CheckBoxMenuItem?

I tried this but it shows only the normal state. When I click, it doesn't change to the checked state.

10 years ago
It worked perfectly on this example now I just have to try it on the main project. Thank you very much.

Edit: It worked on the main project as well. Thank you again for your help.
10 years ago
If you go on the first JCheckboxMenuItem, the selectionBackground should be the same color as the second one.


10 years ago
Yes, well I figured out the actual problem, the UIManager can't apply the selectionBackground color on a static component. I made a simple window with just a menu and a checkbox inside it and what do you know it worked perfectly. So the problem now, is how to make the UIManager work on a static component.
10 years ago
Yes, sorry about that! I guess the default one, which I believe is - this - .
10 years ago
Hey guy,

Am I doing something wrong or what? I want to change the color for the selection background of the JCheckboxMenuItem and it doesn't change at all. This is what I have, what am i doing wrong?

10 years ago
Well believe it or not, index-2 works. Initially I used index-1 but it didn't set the caret to the correct line.
10 years ago
I finally got it working, thanks Michael for your help.

Maybe somebody will need the following code. This is how I did it.

10 years ago
Hello guys,

I have a problem.

How can I jump to a specific line (using the line specified in a JTextfield) in a JTextarea ?

This is what I have so far, but it doesn't seem to work.

10 years ago