-3

I want to know is there a way to reach working objects in RAM in Java.. let's think that I have a JDialog class which is not modal . and dialog is appears in action of list compaund with given parameters non modal dialogs running statistically

so that as u see in pic every time new dialog is appears . Is there any way to se if the dialog with given parameters is running (still not disposed ) without collecting opened dialogs in to some array or collection .. is there any way to search for them in RAM or JVM memory ?

Said
  • 1
  • Why not just use a modal JDialog? – azurefrog Nov 14 '16 at 16:17
  • it's easy to compare the models ..for this prog .. but it's just an example .. sometimes you just lost the way of sending objects from pattern to another .. maybe with it you can send them to the stack or runtime and extract from another pattern (Ex :component) .. – Said Nov 14 '16 at 16:20
  • store them in a list?! – Philipp Sander Nov 14 '16 at 16:21
  • It sounds like you're missing a few of the absolute basic tutorials if you're wondering how you can search the RAM for "lost" objects.. – Kayaman Nov 14 '16 at 16:22
  • I want to make if (the dialog with this parameters is on screen or still not disposed ) make it front and dont open another .. – Said Nov 14 '16 at 16:22
  • 1
    Thanks for ur help ..but that what i mentioned about "whitout storing them in list or any collection" – Said Nov 14 '16 at 16:23
  • store them in a list, on click check if it's already opened, if yes => foreground. I think you should read some more tutorials on objective-orientation. – Philipp Sander Nov 14 '16 at 16:24
  • 1
    why do you not want to store them?! – Philipp Sander Nov 14 '16 at 16:25
  • 1
    Right, but why would you ever choose the way you are asking about over storing it in a tried and true Java data structure? – rmlan Nov 14 '16 at 16:25
  • storing them in a list/collection does not take significantly more RAM if you're affraid of that. – Philipp Sander Nov 14 '16 at 16:26
  • I think there is no any problems with tourtoils .. Im storing them in a list now but there is a problem appears and amazingly not every time :).. what is happening whith the dialog object in list after you dispose it from inside .. ? – Said Nov 14 '16 at 16:33

1 Answers1

0

I want to know is there a way to reach working objects in RAM in Java

Yes. All object are "in the RAM"

Is there any way to se if the dialog with given parameters is running

Store them in a list, that way you can access them.

Philipp Sander
  • 10,139
  • 6
  • 45
  • 78
  • for that reason I've mentioned "without storing them in a list or any collection ".. so it means there is not any way of doing this :( Thanks for ur help.. – Said Nov 14 '16 at 16:28
  • but WHY?! please tell us why you do not want to store them. – Philipp Sander Nov 14 '16 at 16:30
  • I think there is no any problems with tourtoils .. Im storing them in a list now but there is a problem appears and amazingly not every time :).. what is happening whith the dialog object in list after you dispose it from inside .. ? :) – Said Nov 14 '16 at 16:44