Probs compiling - instanceOf statement and close brackets



I am a swing newbie and kind of inexperienced in java. I am using
NetBeans (I don't think that comes in to play, though).

I am implementing my own layout manager, and I am getting compile
errors in which I do not understand what it wants me to do differently.
In my code listing I have put the compile error messages in comments
on the line in which they happen. Can someone help me understand what
the compiler wants?

Thanks for your help

- Paul Schrum

public void layoutContainer(Container target) {
synchronized(target.getTreeLock()) {
Dimension dim;
Insets insets = target.getInsets();
int maxwidth = target.getWidth() - (insets.left +
insets.right);
int nmembers = target.getComponentCount();
int x = 0, y = insets.top;
int rowh = 0, start = 0;
for (int i = 0 ; i < nmembers ; i++) {
Component m = target.getComponent(i);
if(m instanceOf JFrame) { // '/' expected
layoutContainer(m);
dim = m.getSize();
}
else if(m instanceOf(JTextField)) {
i = i + 0;
}
} // illegal start of expression
}
}

.



Relevant Pages

  • Re: Rhythmbox and Exaile Silent
    ... Rhythmbox and Exaile on Fedora 9 can't play audio anymore. ... after that, the audio is restored, but, not on Xfce, only in Gnome. ... Maybe I will have to compile mplayer once again. ...
    (Fedora)
  • Java and SOAP
    ... I have written a little java file ... and it doesn't compile with NetBeans: ... Here is the compilation output by NetBeans ...
    (comp.lang.java.programmer)
  • Re: Compiling Java for Cross Platform Compatibility
    ... >>The university requires that you hand your .java file in and not the ... >may compile under Windows fine but may compile differently under Linux. ... >Also have a look at netbeans. ... It's more heavy duty than BlueJ ...
    (comp.lang.java.help)
  • Re: Show of support for Distributed NetBeans
    ... Just thought I'd show a bit of support for the Distributed NetBeans ... I'd also like to see more documentation on how to debug the IDE Server and associated stuff on the VMS side. ... The IDE server is running and it seems to be responding to the diagnostics and compile requests. ... I can manually ftp from the client to the server without problem, but the ide client doesn't seem to be able to do it. ...
    (comp.os.vms)
  • netbeans 5.0 and DOMimplementation
    ... I am trying to compile a java program with netbeans 5.0 ... I tried to find a hint via google but just found a posting in Italian language. ...
    (comp.lang.java.programmer)