Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2004, 04:44 PM
syu syu is offline
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Blank String in JRadioButton Constructor

Hi all,

I created a JRadioButton something like this:

String strUser = "UserName";
JRadioButton jrb = new JRadioButton("Hello" + " "+strUser);

However, the GUI doesn't display the blank string between two phrases. I also tried the following but none of them work.

JRadioButton jrb = new JRadioButton("Hello" + "\t"+strUser);

JRadioButton jrb = new JRadioButton("Hello "+strUser);

Does any one have any idea what's wrong with it?

Thank you in advance



Reply With Quote
  #2 (permalink)  
Old March 25th, 2004, 07:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your first example works fine for me so I'm not sure why it doesn't for you. As an altenrative method you could always use setText(), but by doing this you aren't actually resolving your pronblem. Post all of your code and I'll have a look.

Cheers

Martyn
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Constructor nayeem69 .NET Framework 2.0 1 July 17th, 2007 12:33 AM
Constructor ramess C++ Programming 1 March 18th, 2006 07:23 PM
constructor in servlets bondalapati98 Servlets 5 January 16th, 2006 12:27 AM
Problem with a constructor Mishkina General .NET 0 September 23rd, 2005 08:26 AM
VB constructor snowbelly VB How-To 2 August 18th, 2004 04:42 AM



All times are GMT -4. The time now is 09:00 PM.


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