Re: Help: adding a JPanel to a JPanel in the center layout



On Tue, 30 Aug 2005 15:44:14 -0700, Unknown wrote:

> Hi all! I'm writting an implementation for a mastermind game. I have a
> class that represents all the holes in which the user can click on to guess
> the appropriate sequence of pegs. When I add an object(extends JPanel and
> overrides the paintcomponent to display images as the holes)

Why not use a GridLayout?

>..to another
> JPanel in the BorderLayout.CENTER, it still positions the Panel far to the
> left in the center of the root panel. If you have any suggestions, ..

Tell us exactly what you're doing, in code..
<http://www.physci.org/codes/sscce.jsp>

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Give me a whiskey, don't think twice.."
The Angels 'Marseille'
.



Relevant Pages

  • Re: adding a JPanel to a JPanel in the center layout
    ... I'm writting an implementation for a mastermind game. ... > JPanel and overrides the paintcomponent to display images as the holes) to ... > another JPanel in the BorderLayout.CENTER, ... > far to the left in the center of the root panel. ...
    (comp.lang.java.help)
  • Help: adding a JPanel to a JPanel in the center layout
    ... I'm writting an implementation for a mastermind game. ... class that represents all the holes in which the user can click on to guess ... JPanel in the BorderLayout.CENTER, it still positions the Panel far to the ... left in the center of the root panel. ...
    (comp.lang.java.help)
  • Re: Help: adding a JPanel to a JPanel in the center layout
    ... >overrides the paintcomponent to display images as the holes) to another ... >JPanel in the BorderLayout.CENTER, it still positions the Panel far to the ... >left in the center of the root panel. ...
    (comp.lang.java.help)