java - JOptionPane - show dialog of my own JDialog sub class -
say have class mydialogclass extends jdialog
, utilize everywhere in application, in order acheive specific behaviour of dialogs. now, want enjoy benefits of joptionpane
utilities, , phone call showxxxdialog
view messages / errors etc., still want underlying dialogs behave mydialogclass
instances.
is possible achive (prefferably without replicating source of joptionpane
)?
edit:
the specific behaviour trying acheive setting dialog alwaysontop
true
. seek @andrew's solution issue. but, current problem i'm facing, , not extended behaviour in mydialogclass
. there might such "workaround" every single problem, intentionaly looking conceptual solution, reason putting question did.
[[for instance - mydialogclass
registeres windowlistener
it's instances in constructor]]
you can display jdialog
in joptionpane
, shown in how create dialogs: stopping automatic dialog closing.
in case, must implement own property alter listener when user clicks button, dialog not automatically close.
related examples seen here , here.
java swing oop dialog
No comments:
Post a Comment