Re: add JPanel and JLabel on JButton

From: Andrew Thompson (andrew64_at_bigNOSPAMpond.com)
Date: 12/13/03

  • Next message: Henri: "Swing and OLE"
    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
    

  • Next message: Henri: "Swing and OLE"