Re: add JPanel and JLabel on JButton
From: Andrew Thompson (andrew64_at_bigNOSPAMpond.com)
Date: 12/13/03
- Previous message: Patrick Gwiasda: "Re: Outlookstyle Side Bar"
- In reply to: Robert Ludewig: "Re: add JPanel and JLabel on JButton"
- Next in thread: Harald Hein: "Re: add JPanel and JLabel on JButton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 13 Dec 2003 09:00:32 GMT
"Robert Ludewig" <schwertfischtrombose@gmx.de> wrote in message
news:brei0p$2fo8l$1@ID-140548.news.uni-berlin.de...
> > JButton is a container so you can add components in the same way you
would
> >normally.
>
> JButton button = new Button ();
> button.add.(new JPanel());
Was that a typo? Try..
button.add(new JPanel());
[ look carefully ]
> gives a nullpointerexception
-- Andrew Thompson * http://www.PhySci.org/ PhySci software suite * http://www.1point1C.org/ 1.1C - Superluminal! * http://www.AThompson.info/andrew/ personal site
- Previous message: Patrick Gwiasda: "Re: Outlookstyle Side Bar"
- In reply to: Robert Ludewig: "Re: add JPanel and JLabel on JButton"
- Next in thread: Harald Hein: "Re: add JPanel and JLabel on JButton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]