Discussion:
JDialog unmovable
(too old to reply)
Hitesh
22 years ago
Permalink
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
ak
22 years ago
Permalink
u can use JWindow it have no title bar at all.
Post by Hitesh
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
Hitesh
22 years ago
Permalink
Post by ak
u can use JWindow it have no title bar at all.
Post by Hitesh
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
The problems is it's got nothing at all...isnt there a better way? a way
to make a JDialog immobile?
--
Hitesh Kanwathirtha
Undergrad CS Major
***@cc.gatech.edu
ak
22 years ago
Permalink
It is not possible to make a JDialog immobile (dont know why, ask SUN ppl).
but it is possible to add title bar to JWindow and (if needed) make it modal
(like JDialog).
Post by Hitesh
Post by ak
u can use JWindow it have no title bar at all.
Post by Hitesh
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
The problems is it's got nothing at all...isnt there a better way? a way
to make a JDialog immobile?
--
Hitesh Kanwathirtha
Undergrad CS Major
Gerbrand van Dieijen
22 years ago
Permalink
Post by Hitesh
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
A very ugly method could be a thread that sets the JDialog at a fixed
position each interval.

Best is probably a JWindow anyway. You coul add you'r own decoration
yourself using the paint/graphics/graphics2d method.
--
Gerbrand van Dieijen
Frank
22 years ago
Permalink
Post by Hitesh
I was playing around with the JDialog component and was wondering if there
was any way to make it fixed position, i.e to not make it move?
well, you can add a component listener, on every componentMoved... just
move it back...

as for the *should* part... this seems to follow the ideology of:

"That user moved their window to somewhere where they want it! We'll show
them for fiddling with system defined settings!"

HTH

Frank

Loading...