Need help with images [message #871827] |
Tue, 15 May 2012 00:13 |
George Smith Messages: 4 Registered: March 2012 |
Junior Member |
|
|
Hi, I am having trouble getting images working. I have installed a designer plugin that shows what the program should look like when it is run and it shows the picture as being there and working, however when I run it, it doesn't display. Below is the code I have been using to display the pic that works in the ide, would appreciate any help
private JPanel getjPanelImages() {
if (jPanelImages == null) {
String path = "3.png";
jPanelImages = new JPanel(new BorderLayout());
JLabel label = new JLabel(new ImageIcon(path));
label.setHorizontalAlignment(JLabel.CENTER);jPanelImages.add(label);
//jPanel1 = new JPanel();
//jPanel1.setLayout(new GroupLayout());
//jPanel1.add(getJLabel0(), new Constraints(new Leading(140, 10, 10), new Leading(137, 10, 10)));
}
return jPanelImages;
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07990 seconds