Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jButton's floating over a Canvas?

Status
Not open for further replies.

MartinF

Technical User
Sep 19, 2000
143
0
0
FR
Hi,

I am developing an app that uses a custom canvas that fills the entire Frame that the app runs in. The app is driven form interacting with the content rendered on this canvas (in this case a schematic drawing that is navigated around)

What i would like to do is have jButtons (and maybe other jComponents) appearing over this canvas (say, down in a corner somewhere) Is there a simple way to do this?

I can achieve the result i am looking for by writing tons of code to make static images appear and behave as buttons, but didnt really wish to go down this route if there was a much quicker and simpler method.

Any ideas?

Thanks in advance...
 
Sorry for not being a native english speaker, but could you ellaborate "over"? I guess it's not enough to add the component to the canvas.

Cheers,
Dian
 
Hi,

Yes, what i want to do is effectively add a jButton to the Canvas as you do with an Add(Component c) method. There does not seem to be one of these methods allowing this in the Canvas Class, as there is with say a Panel.
 
Oh, Canvas with capital C. But that's a Component, not a Container. Did you try adding the button to the underlying container?

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top