Halli und Hallo,
beschäftige mich grad mal wieder mit meinem kleinen Proggi und häng an nem Fehler.
Wenn ich das gute Stück als .jar gepackt hab werden keine Buttons angezeit, auch nicht wenn ich mit der Maus drübergeh. Im eclipse funktionierts aber :?:
Hat jemand ne Idee??
beschäftige mich grad mal wieder mit meinem kleinen Proggi und häng an nem Fehler.
Wenn ich das gute Stück als .jar gepackt hab werden keine Buttons angezeit, auch nicht wenn ich mit der Maus drübergeh. Im eclipse funktionierts aber :?:
Hat jemand ne Idee??
Code:
import java.awt.Dimension;
import javax.swing.JButton;
import java.awt.event.*;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Point;
import javax.swing.JFrame;
public class player extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
private JLabel bg = null;
private JButton play = null;
private play sec = null;
private JButton stop = null;
private stop stp = null; // @jve:decl-index=0:
private JButton ff = null;
private ff ffo = null; // @jve:decl-index=0:
private JButton rr = null;
private rr rro = null; // @jve:decl-index=0:
private JButton next = null;
private next nex = null; // @jve:decl-index=0:
private JButton back = null;
private back bac = null;
private JButton pl1 = null;
private pl1 pla = null; // @jve:decl-index=0:
private JButton pl2 = null;
private pl2 plb = null;
private JButton pl3 = null;
private pl3 plc = null;
private JButton pl4 = null;
private pl4 pld = null; // @jve:decl-index=0:
private JButton visual = null;
private visual vis = null;
/**
* This is the default constructor
*/
public player() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
bg = new JLabel();
bg.setIcon(new ImageIcon(getClass().getResource("/pics/Layout_1.jpg")));
bg.setEnabled(true);
bg.setLocation(new Point(0, 0));
bg.setSize(new Dimension(635, 480));
bg.setText("");
bg.setVisible(true);
this.setLayout(null);
this.setSize(640, 480);
this.setMinimumSize(new Dimension(640, 480));
this.setEnabled(true);
this.setResizable(false);
this.setTitle("°°ooOO^AUDI^OOoo°°");
this.setVisible(true);
this.add(bg, null);
this.add(getplay(), null);
this.add(getstop(), null);
this.add(getff(), null);
this.add(getrr(), null);
this.add(getnext(), null);
this.add(getback(), null);
this.add(getpl1(), null);
this.add(getpl2(), null);
this.add(getpl3(), null);
this.add(getpl4(), null);
this.add(getvisual(), null);
}
/**
* This method initializes play
*
* @return javax.swing.JButton
*/
private JButton getplay() {
if (play == null) {
play = new JButton();
play.setVisible(true);
play.setIcon(new ImageIcon(getClass().getResource("/pics/play.jpg")));
play.setSize(new Dimension(58, 50));
play.setRolloverEnabled(true);
play.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/play.JPG")));
play.setLocation(new Point(318, 388));
play.addActionListener(this);
add(play);
}
return play;
}
private JButton getstop() {
if (stop == null) {
stop = new JButton();
stop.setRolloverEnabled(true);
stop.setLocation(new Point(250, 388));
stop.setSize(new Dimension(58, 50));
stop.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/stop.JPG")));
stop.setIcon(new ImageIcon(getClass().getResource("/pics/stop.jpg")));
stop.addActionListener(this);
add(stop);
}
return stop;
}
/**
* This method initializes ff
*
* @return javax.swing.JButton
*/
private JButton getff() {
if (ff == null) {
ff = new JButton();
ff.setLocation(new Point(386, 388));
ff.setRolloverEnabled(true);
ff.setIcon(new ImageIcon(getClass().getResource("/pics/forward.JPG")));
ff.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/forward.JPG")));
ff.setSize(new Dimension(58, 50));
ff.addActionListener(this);
add(ff);
}
return ff;
}
/**
* This method initializes rr
*
* @return javax.swing.JButton
*/
private JButton getrr() {
if (rr == null) {
rr = new JButton();
rr.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/backward.JPG")));
rr.setLocation(new Point(182, 388));
rr.setSize(new Dimension(58, 50));
rr.setIcon(new ImageIcon(getClass().getResource("/pics/backward.JPG")));
rr.addActionListener(this);
add(rr);
}
return rr;
}
/**
* This method initializes next
*
* @return javax.swing.JButton
*/
private JButton getnext() {
if (next == null) {
next = new JButton();
next.setLocation(new Point(454, 388));
next.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/next.JPG")));
next.setIcon(new ImageIcon(getClass().getResource("/pics/next.JPG")));
next.setSize(new Dimension(58, 50));
next.addActionListener(this);
add(next);
}
return next;
}
/**
* This method initializes back
*
* @return javax.swing.JButton
*/
private JButton getback() {
if (back == null) {
back = new JButton();
back.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/back.JPG")));
back.setLocation(new Point(115, 388));
back.setSize(new Dimension(58, 50));
back.setIcon(new ImageIcon(getClass().getResource("/pics/back.JPG")));
back.addActionListener(this);
add(back);
}
return back;
}
/**
* This method initializes pl1
*
* @return javax.swing.JButton
*/
private JButton getpl1() {
if (pl1 == null) {
pl1 = new JButton();
pl1.setLocation(new Point(29, 301));
pl1.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/PL1.JPG")));
pl1.setIcon(new ImageIcon(getClass().getResource("/pics/PL1.JPG")));
pl1.setSize(new Dimension(58, 50));
pl1.addActionListener(this);
add(pl1);
}
return pl1;
}
/**
* This method initializes pl2
*
* @return javax.swing.JButton
*/
private JButton getpl2() {
if (pl2 == null) {
pl2 = new JButton();
pl2.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/PL2.JPG")));
pl2.setLocation(new Point(29, 388));
pl2.setSize(new Dimension(58, 50));
pl2.setIcon(new ImageIcon(getClass().getResource("/pics/PL2.JPG")));
pl2.addActionListener(this);
add(pl2);
}
return pl2;
}
/**
* This method initializes pl3
*
* @return javax.swing.JButton
*/
private JButton getpl3() {
if (pl3 == null) {
pl3 = new JButton();
pl3.setLocation(new Point(545, 301));
pl3.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/PL3.JPG")));
pl3.setIcon(new ImageIcon(getClass().getResource("/pics/PL3.JPG")));
pl3.setSize(new Dimension(58, 50));
pl3.addActionListener(this);
add(pl3);
}
return pl3;
}
/**
* This method initializes pl4
*
* @return javax.swing.JButton
*/
private JButton getpl4() {
if (pl4 == null) {
pl4 = new JButton();
pl4.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/PL4.JPG")));
pl4.setLocation(new Point(545, 388));
pl4.setSize(new Dimension(58, 50));
pl4.setIcon(new ImageIcon(getClass().getResource("/pics/PL4.JPG")));
pl4.addActionListener(this);
add(pl4);
}
return pl4;
}
/**
* This method initializes visual
*
* @return javax.swing.JButton
*/
private JButton getvisual() {
if (visual == null) {
visual = new JButton();
visual.setLocation(new Point(208, 301));
visual.setRolloverIcon(new ImageIcon(getClass().getResource("/pics/visual.JPG")));
visual.setIcon(new ImageIcon(getClass().getResource("/pics/visual.JPG")));
visual.setSize(new Dimension(206, 50));
visual.addActionListener(this);
add(visual);
}
return visual;
}
public void actionPerformed( ActionEvent evt) {
Object source = evt.getSource();
if (source == ff) {
ffo = new ff();
ffo.getClass();
}
else if (source == rr) {
rro = new rr();
rro.getClass();
}
else if (source == next) {
nex = new next();
nex.getClass();
}
else if (source == back) {
bac = new back();
bac.getClass();
}
else if (source == play) {
sec = new play();
sec.getClass();
}
else if (source == stop) {
stp = new stop();
stp.getClass();
}
else if (source == pl1) {
pla = new pl1();
pla.getClass();
}
else if (source == pl2) {
plb = new pl2();
plb.getClass();
}
else if (source == pl3) {
plc = new pl3();
plc.getClass();
}
else if (source == pl4) {
pld = new pl4();
pld.getClass();
}
else if (source == visual) {
vis = new visual();
vis.getClass();
}
}
}