I'm working in java me. I created two visual designs, First.java and Second.java both of which contains form displayables.
I added an Ok command to a form in First.Java and the user is expected to switch to SecondForm in Second.java but I get this error non-static method getSecondForm() cannot be referenced from a static context
.
How can I fix this?
Both files are in the same package. Here's the source code
public void commandAction (Command command, Displayable displayable) { if (displayable == firstForm) { if (command == exitCommand) { exitMIDlet(); } else if (command == okCommand) { switchDisplayable(null, Second.getSecondForm()); } } }