GIF on a button [message #605416] |
Fri, 18 February 2005 21:19 |
Mike Messages: 49 Registered: July 2009 |
Member |
|
|
I've just downloaded VE 1.0.2 this week and converted a handful of our
dialogs to it. ( ...originally created in Visual Cafe. ) Everything seems to
be going well, except I don't get images on buttons and such, neither in the
VE Editor or when running the application.
The primary class is a JFrame with this code:
private JPanel getJContentPane()
{
if (m_jContentPane == null)
{
m_jContentPane = new JPanel();
m_jContentPane.setLayout(null);
btnLogo = new javax.swing.JButton();
pnlUpMain.setLayout(new FlowLayout(FlowLayout.RIGHT,0,0));
m_jContentPane.add(BorderLayout.NORTH, pnlUpMain);
pnlUpMain.setBounds(0,0,757,11);
pnlUpMain.add(btnLogo);
btnLogo.setBounds(722,0,35,11);
URL oIconURL = ClassLoader.getSystemResource("images/Logo.gif");
ImageIcon oLogoIcon = new ImageIcon(oIconURL);
btnLogo.setIcon(oLogoIcon);
}
btnLogo is a JButton
pnlUpMain is a JPanel
Do I have it set up wrong? Does VE not support drawing images in the editor?
Thanks,
Mike
|
|
|
Powered by
FUDForum. Page generated in 0.03292 seconds