Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Originally posted by Derek Boring:
Java keeps telling me that the bolded method call is static and can't call a non-static method, but I'm not understanding why the call is static. Can someone please clarify for me?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Originally posted by Derek Boring:
...Cannot make a static reference to the non-static method setTabTitle(String, JPanel) from the type BrowserFrame...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Originally posted by Derek Boring:
Ok, I think I understand now. Because BrowserFrame is a class name and not an instance name, it requires a static call to it, right? ...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Derek Boring:
... The code at the very top is in HTMLFrame which extends JPanel. HTMLFrame is in a JScrollPane and the JScrollPane is inside a JTabbedPane called 'tabs'(instance name). tabs is on a JFrame with the class name BrowserFrame. From HTMLFrame, is there a way to get a handle to BrowserFrame without having to pass it down and without making anything static? ...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by marc weber:
...Your HTMLFrame (a JPanel) can call getTopLevelAncestor() for a reference to the BrowserFrame (a top-level JFrame)...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Don't get me started about those stupid light bulbs. |