Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to fix this?(Browser problem)
How to fix this? [message #1318874] Sun, 27 April 2014 23:20 Go to next message
Daniel Cornejo is currently offline Daniel CornejoFriend
Messages: 1
Registered: April 2014
Junior Member
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?
Re: How to fix this? [message #1319148 is a reply to message #1318874] Mon, 28 April 2014 03:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3881
Registered: July 2009
Senior Member

This is more of a general Java programming question than one specific to Eclipse. You'd find a wider audience at sites like javaranch.com and stackoverflow.com. In this situation, since Java is a case-sensitive language, you're trying to call #frameHandler() while you actually declared #framehandler().

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: How to fix this? [message #1319902 is a reply to message #1319148] Mon, 28 April 2014 13:06 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
Also, you obviously didn't pay attention to the Problems or Markers views in Eclipse, which indicate when you have compilation errors or warnings.
Previous Topic:hudson build wiht parameters
Next Topic:Specifying the JVM
Goto Forum:
  


Current Time: Tue Oct 27 16:26:32 GMT 2020

Powered by FUDForum. Page generated in 0.03246 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top