0

I am currently trying to visualize a couple of images with two JTextAreas below. The following happens: The images are centered and the text within the JTextAreas is left aligned. I would like to be able to also display the images on the left. I am using the following code to make the panel

public MetaboliteInfo(SwingEngine se)
    {
        super();
        Engine engine = se.getEngine();
        engine.addApplicationEventListener(this);
        VPathway vp = engine.getActiveVPathway();
        if(vp != null) vp.addSelectionListener(this);

        this.gdbManager = se.getGdbManager();
        this.se = se;

        setLayout (new BorderLayout());

        panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        scroll = new JScrollPane(panel);
        add (scroll, BorderLayout.CENTER);           

    }
4

1 回答 1

1

这可能会帮助你

http://docs.oracle.com/javase/tutorial/uiswing/components/text.html

于 2012-07-11T09:59:24.010 回答