i want to use a JButton with a rollover sound..so created a button with a sound using adobe macromedia flash...
how can i display it in the swf button in jpanel??
here is the button..button.swf
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class MyPanel extends JPanel {
private JButton jcomp1;
public MyPanel() {
//construct components
jcomp1 = new JButton ("button.swf");
//adjust size and set layout
setPreferredSize (new Dimension (220, 149));
setLayout (null);
//add components
add (jcomp1);
//set component bounds (only needed by Absolute Positioning)
jcomp1.setBounds (55, 90, 100, 25);
}
public static void main (String[] args) {
JFrame frame = new JFrame ("MyPanel");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add (new MyPanel());
frame.pack();
frame.setVisible (true);
}
}