I was wondering how this would interfere with the main class when called, I have found no suitable way to make a main class and call it in a final.
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
class Converter extends JFrame implements
KeyListener, ItemListener, MouseListener {
//insert body here//
@Override
public void paintComponents (Graphics g) {g.drawImage(icon.getImage(), 0, 20, 500,210, this);
super.paintComponents (g);
Color transparent = new Color (0, true);
background.setBackground(transparent);
repaint ();
background.setVisible(true);
pack();
setContentPane(background);
background.setLayout(new FlowLayout());
add (background);
}
}
class ShowconverterFrame {
public static void main (String args []) {
new Converter ();
}
}
Hi I am trying to figure out why this wont work... any help is appreciated! It returns with "no main class found" and that it cannot be declared as static. I just added this piece to the body and all of the sudden the whole things stops working. I have been trying to implement a JPanel in which I have an JLabel that is an image.