Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2008, 05:47 PM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Two JButton problems

Hey guys.

My first problem is that a JButton won't display in a newly-run applet unless the cursor if hovered over it, and will disappear if I bring up another window and go back to the applet. This applet also contains a Graphics component and a few other GUI objects (although whether or not the latter are created doesn't seem to affect the JButton's behavior).

Also, I'm unable to display .bmps on JButtons.

ImageIcon icon = new ImageIcon("[...].bmp");
okButton = new JButton (icon);

Everything runs normally with the above code included, but the button itself remains blank. I unfortunately can show only a very limited amount of code, but will try to provide more if necessary. Appreciate the help in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems already! KennySargent BOOK: Professional XNA Programming 2nd Edition ISBN: 978-0-470-26128-6 4 April 7th, 2008 03:36 AM
Q: JButton with Mouseover and sound kifissia Java Basics 1 March 16th, 2007 06:38 AM
2 problems here with me naveed77 Beginning VB 6 1 October 17th, 2006 06:04 PM
validate.asp problems and logon.asp problems p2ptolu Classic ASP Databases 0 February 16th, 2005 02:34 PM
JButton lgschulz JSP Basics 2 November 7th, 2004 10:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.