File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Bolded buttons, unbolding themselves..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Bolded buttons, unbolding themselves..?" Watch "Bolded buttons, unbolding themselves..?" New topic

Bolded buttons, unbolding themselves..?

son dunckley

Joined: Jul 27, 2005
Posts: 17

I have a really strange problem and I don't know where to look in my code for it so hopefully someone out there can help me

I have a GUI with some buttons on it - all of which have the text as bold.

Its an odd problem which I haven't quite managed to track down to a certain action as yet but here goes:

The buttons all appear bold when the applet is first run up. however, sometimes if you hover the mouse over a button they start unbolding themselves. To get them to go bold again I click on one button and once it has actioned something the buttons start to bold again...?

I am completely lost as to go about sorting this problem. Does anyone have any ideas what I have or haven't set to make this happen?

I initially created this GUI in netbeans and then moved it into Eclipse to change it to an applet(as netbeans only created a frame).

Hope someone can help.

Thanks in advance

below is an extract of my code, as I have quite a bit for the GUI so didn't want to post more than is needed. Is there anyway I can attach my code to a post as this would make it easier for you to see what I mean? or I can e-mail it to anyone willing to help with this

[ July 30, 2005: Message edited by: son dunckley ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Is there anyway I can attach my code to a post as this would make it easier
> for you to see what I mean?

the easiest way is to create a small sample program that demonstrates the problem.

in this case an applet with only one button.
the button does nothing except display the behaviour you mention.

quite often the solution is 'found' during the building of the sample program
son dunckley

Joined: Jul 27, 2005
Posts: 17

Thanks for the response but I'm not sure what you are saying I should do?

I have a program running, which is made up of three classes - hence not wanting to attach 'ALL' my code. I just wondered if there was anyway I could zip up my full program and attach to the forum?

Or if anyone could point me in the direction of where I might look for this problem?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41154
What Michael is saying is that you should create a minimal program that still exhibits the problem: just one class that shows one button. That should have a size that's suitable to post here.

Ping & DNS - my free Android networking tools app
son dunckley

Joined: Jul 27, 2005
Posts: 17
oh OK - Thank you

Will have a go at this and if I still cannot see the problem, will post the smaller code here.

Don't get me started about those stupid light bulbs.
subject: Bolded buttons, unbolding themselves..?
Similar Threads
getting error with applets
Null Pointer Exception - Driving Me Mad!
linking splash screen to my code
JComboBox in panel
using image and color as a background on JFrame