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



On Tue, 30 Aug 2005 15:44:14 -0700, "Unknown"
<unknownerror404@xxxxxxxxxxx> wrote or quoted :

>When I add an object(extends JPanel and
>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. If you have any suggestions, thanks
>ahead of time!

You could try a GridBagLayout which has insets for controlling the
fine positioning. see http://mindprod.com/jgloss/gridbaglayout.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.



Relevant Pages

  • Re: Image on Jpanel, with sensible resizing
    ... I want an image to display in a jpanel. ... the dimensions of the panel, it should display at its normal size. ... I have added a ComponentListener to my panel (see ResizeListener ...
    (comp.lang.java.gui)
  • Re: Help cutting aluminum panel
    ... What would I need if I wanted to punch holes (some small diameter ... It is remotely possible you could set up all your holes on a single platen and do them on this kind of punch, but that is really doing work it is not designed for. ... If you are doing a hundred at a time, you could set up each size punch and die and have a guide that would align the panel properly for the holes. ... There are desktop-sized versions of the OBI punches that could do this, actually you don't need the "open back" kind at all. ...
    (rec.crafts.metalworking)
  • Re: focus group question for new products
    ... through the front panel. ... Back panel has several BNC's and other stuff mounted in D-shape holes. ... These could add another $30-$100 to what I'd pay. ... a really finished custom box. ...
    (rec.radio.amateur.homebrew)
  • Re: How to detect focus lost on a JPanel
    ... The basic design is a Frame containing a menu and a JTabbedPanel. ... Now, if focus is inside any of this JTextFields, and I select a new ... So far, I have tried to add a FocusListener to the JPanel descendents, ... focus enters a JTextField contained within the panel itself, ...
    (comp.lang.java.gui)
  • Re: draw transparent componet on bufferedimage?
    ... i want to copy a panel (living in the ... final JPanel panel1 = new JPanel; ... Dimension preferedSize = new Dimension ... public static BufferedImage createImage{ ...
    (comp.lang.java.programmer)