Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » GIF on a button
GIF on a button [message #80742] Fri, 18 February 2005 21:19 Go to next message
Eclipse UserFriend
Originally posted by: mgilmore.fastesp.com

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
Re: GIF on a button [message #80856 is a reply to message #80742] Fri, 18 February 2005 21:40 Go to previous message
Eclipse UserFriend
Originally posted by: mgilmore.fastesp.com

Please disregard. My layout was set up wrong.


"Mike" <mgilmore@fastesp.com> wrote in message
news:cv5m9t$avv$1@www.eclipse.org...
> 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
>
>
Re: GIF on a button [message #605423 is a reply to message #80742] Fri, 18 February 2005 21:40 Go to previous message
Mike is currently offline MikeFriend
Messages: 49
Registered: July 2009
Member
Please disregard. My layout was set up wrong.


"Mike" <mgilmore@fastesp.com> wrote in message
news:cv5m9t$avv$1@www.eclipse.org...
> 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
>
>
Previous Topic:GIF on a button
Next Topic:paintComponent ignored ?
Goto Forum:
  


Current Time: Tue Apr 16 10:15:46 GMT 2024

Powered by FUDForum. Page generated in 1.04609 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top