View Single Post
  #1 (permalink)  
Old 04-23-2008, 12:14 AM
wizmang wizmang is offline
Member
 
Join Date: Apr 2008
Posts: 1
wizmang is on a distinguished road
Non-Static method in static context error
Hi, I have a section of code from my program which uses a method inherited from another class.

private void processLabyMenu( KeyEvent event ) {
int keycode = event.getKeyCode();
String x = new String();

if( Prax.Cfg.getString("returnToIntro").equalsIgnoreCa se
(KeyEvent.getKeyText(keycode)) )
{
mainWindow.setMapFile( null );
mainWindow.load();
}


and I get the error
"the non-static method getString(java.lang.String) cannot be referenced from a static context".

what can I put in that "if" statement for it to compile?

Thank you in advance...
Reply With Quote
Sponsored Links