java - How can I get the source code of getContentPane()? -


it helpful if can guide me on how can complete source code(documentation) of inbuilt method getcontentpane() of jframe class.

i want override in code.


edit:

ok heres scene, have 2 packages 1 class homepage1 , other homepage2. i'm able access getcontentpane() in homepage2, when use in homepage1 ide(netbeans) says unknown symbol(eventhough have used 'import javax.swing.*'). if code of getcontentpane(),then want paste in class 'homepage1' can access it.

your question classic example of xy problem, meaning you're asking solution of "x" specific (and incorrect) way you're trying solve something, when need "y", actual solution actual overriding problem.

you state in comment:

i'm able access getcontentpane() in homepage2, when use in homepage1 ide(netbeans) says unknown symbol(eventhough have used 'import javax.swing.*').

it means you're not calling getcontentpane() on object has method, on object has root pane. i'm guessing think you're calling on object derived jframe, compiler telling you're not, object isn't jframe.

the solution not dig through source code of swing jframe (or better, jrootpane jframe method call) rather either call method on right object, jframe derived object, or other jrootpane using object such jdialog or japplet, or find way object of interest studying classes , methods available in package of interest. sorry idea solve looking @ or using jframe source getcontentpane() little more fruitless wild goose chase, , suggest drop , search other more fruitful avenues of attack.

if need more specific help, you'll need tell more class harbors object of interest, including showing code.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -