| Re: [ve-dev] Stretch |
|
I am using a JLabel with his picture and no caption. Is it a bad way to do that ? why ? see my code: private void initialize() { this.setContentPane(getJContentPane()); this.setSize(this.w,this.h); this.setTitle("Image View"); } private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); JLabel labelPic = new JLabel(); GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); jContentPane.setLayout(gridLayout); Icon theIcon = getIcon(HyperLinkCursorToolPlugIn.getPathToIcon()); this.h = theIcon.getIconHeight(); this.w = theIcon.getIconWidth(); labelPic.setIcon(theIcon); jContentPane.add(labelPic); } return jContentPane; } Sincerely... Ezequias Joe Winchester wrote:
-- Ezequias Rodrigues da Rocha http://ezequiasrocha.blogspot.com msn:ezequias@xxxxxxxxxxx |