Forums Register Login

Form called by other form

+Pie Number of slices to send: Send
How can I do to call a form from another form? Exemple:
I've a Main Form. From this I need to call other Form. I have a main menu(with some menu item) and this menu item I need to call a form. How can I do? Thanks.
+Pie Number of slices to send: Send
Sounds a Swing-related question, so I shall move it.

But first I shall suggest that you can pass a reference to one Component to the constructor of a class which extends another Component, then they can have references to each other and can pass messages back and forth to each other.
There is another possibility: you can invoke methods like Component#getParent() which can directly find the parent component, and then find its methods.
+Pie Number of slices to send: Send
In the same way you call the Main Form.

eg.


The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 957 times.
Similar Threads
simple web browser in java
XML processing
enable and disable a menu item in a menu bar
Canvas or Form for startup screen
JFrame and JMenu
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:09:29.