How to fix this? [message #1318874] |
Sun, 27 April 2014 19:20  |
Eclipse User |
|
|
|
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method frameHandler() is undefined for the type Browser
at Browser.main(Browser.java:21)
Here's the code
package Daniel
import java.awt.Container;
import java.awt.Font;
import java.awt.Insets;
import java.awt.TextField;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
public class Browser extends JFrame{
private TextField field = new TextField();
private JEditorPane display = new JEditorPane();
private JScrollPane panee = new JScrollPane(display);
public static void main(String agrs[]){
Browser file = new Browser();
file.frameHandler();
}
public void framehandler() {
setTitle("Browser");
setSize(1280, 880);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
setResizable(false);
setLayout(null);
setLocationRelativeTo(null);
addComponentsToFrame(getContentPane(();
}
public void addComponentsToFrame(Container pane){
Insets insets = getInsets();
pane.add(field);
pane.add(panee);
Font font = new Font("Menlo", Font.PLAIN, 12);
field.setFont(font);
field.setBounds(8 - insets.left, 30 - insets.top, 1268, 20);
}
}
Is there any problem with this that I can't run it?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10940 seconds