Hi All,

I have 2-6 radiobuttons added to a panel. A TitledBorder is set to the
panel. At a particular condition, i want to disable the radiobuttons and the
title. Radio buttons can be disabled. " But i want a show similar effect for
the Title ". Any idea or suggestions would be of great help.

wkr,
Srinivasan Samivelu

-----Original Message-----
From: Reinstein, Lenny [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 03:33
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: RE: TitledBorder with label


If I understand you correctly, you can do something like this:

// Panel that needs a title
JPanel panel = new JPanel();
panel.setLayout(new GridBagLayout());

Image titleImage = new Image("c:/images/title.gif");
JLabel titleLabel = new JLabel();  
JPanel titleLabelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

titleLabel.setIcon(new ImageIcon(titleImage));
titleLabelPanel.add(titleLabel);

panel.add(titleLabelPanel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0
            ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new
Insets(0, 0, 0, 0), 0, 0));

panel.add(//.... anything else you want to add....//);


-----Original Message-----
From: Samir [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 4:49 PM
To: 'Swing mailing list - mailman'
Subject: TitledBorder with label


Hi all,

How do I set a titled border to a JPanel which displays a JLabel instead of
a string?

regards
Samir



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to