🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11358

JButtons

#11358
From: wired
Date: Tue, 15 Jun 1999 00:00
49 lines
1749 bytes
I've been experimenting, with Jtoolbars and Jbuttons.

I've put icons on the buttons, an enabled rollovericons. It works fine
in jbuilder's internal applet/applikation viewer. But whenever i deploy
the code, rollovericon don't work, and I have deployed the needed swing
libs.

I tried transfering the code to visual cafe, and everything worked,
except for the rollovericon :( again :( .

hope an explanation can be found

RP

the code :

static Icon[]picno =
  {
    new ImageIcon("Klip.gif"),
    new ImageIcon("Graf.gif"),
    new ImageIcon("File.gif"),
    new ImageIcon("Graf.gif"),
    new ImageIcon("File.gif"),
  };
// init button with picno 0

jButton1.setIcon(faces[0]);

// different button states

 jButton1.setRolloverEnabled(true);
  jButton1.setRolloverIcon(faces[1]);
  jButton1.setPressedIcon(faces[2]);
  jButton1.setDisabledIcon(faces[4]);
  jButton1.setToolTipText("Marker");

  jButton1.addActionListener(new java.awt.event.ActionListener()
 {
      public void actionPerformed(ActionEvent e)
      {
        jButton1_actionPerformed(e);
      }
  });

this.getContentPane().add(jPanel1, BorderLayout.CENTER);

jPanel1.add(jToolBar1, new BorderLayout().CENTER);

jToolBar1.add(jButton1, null);
Technical Details
Message-ID: <376637FD.E1E5D815@hotmail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,395f57479c545ec3,start
X-Google-Attributes: gid111d45,public
From: wired <wiredhands@hotmail.com>
Subject: JButtons
Date: 1999/06/15
Message-ID: <376637FD.E1E5D815@hotmail.com>
X-Deja-AN: 489811472
Content-Transfer-Encoding: 7bit
Organization: Customer at Tele Danmark Erhverv
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing