Connect a button to another GUI

I have created a menu using gui builder in netbeans and i want to link the items to open another gui. for example on then list i have "add a member" when click it, it should open my "add member" for. When i select AddMemberActionPerformed i get the following:
} private void AddMemberActionPerformed(java.awt.event.ActionEvent evt) {                     
    }                                         Please tell me what to fill in here, thanks

NetBeans creates this method structure for you.
private void AddMemberActionPerformed(java.awt.event.ActionEvent evt) {                     
inside it you must put your code to be executed when the event is fired. There are many kind of events, in this case is an ActionPerformed event linked to your component.
If you want to open another GUI then you must fill it with the code to open that GUI.Not all GUIs can be opened on the same way but I will give you some example.
1.- Lets say you have a JFrame class to open called MyFrame
MyFrame gui=new MyFrame ();
gui.show ();
2.- Lets say you have a JPanel then you may want to add it to another Container or something.

Similar Messages

  • TS1398 my ipod will not connect to my home wifi, it can see it and asks for a password but will not connect. I have tried it at another location and it will connect to other wifi connections. I have another ipod that is connecting just fine to my home wif

    My ipod will not connect to my home wifi, it can see it and asks for a password but will not connect. I have tried it at another location and it will connect to other wifi connections. I have another ipod that is connecting just fine to my home wifi.

    - Reset the iPod. nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections

  • Connect Gallery buttons rather than thumbnails?

    This seems like it should be easy, but I cannot figure out how to do this in AS3. And after pouring through several books and lots of sample projects, no one quite seems to be using this method to create galleries.
    The goal: A gallery with circles for buttons that, when clicked, move already loaded images into view.
    I have built a widget that creates the buttons and loads the images, but how do I make a connection between one dynamically created sprite (the button) and another (the corresponding image)?
    When adding children, is there a way to find its reference in the display object list? The buttons are named and will trace their names when clicked, but I don't see this when I'm listing the display objects. And I'm not sure how I can use these names or provide similar names for my loaded images. (My confusion is becoming evident here -- or at least clouding my mind -- so I'll just leave it at that.)
    BTW, I have come across several tools/players that do something similar to what I want, but I'd prefer not to use someone else's controller. (It seems like the time to code this should be less than the time to skin/understand/customize someone else's FLA/SWF.)
    Thanks,
    Tim

    It's no problem to use an index to link these. Ideally, I want Button_1 to control Image_1 and so having Loader_1 do this makes sense.
    What I'm not seeing is how to do this with event listeners. I'm going to have lots of different functions referring to the loaders, and the only way I've used this so far in my AS3 career is with globals defined outside of functions on the timeline. (I've never used classes of my own creation.)
    I've tried creating a global array of loaders, but Flash kicks out tons of errors, telling me I can't use null objects. Or I try doing something like this:
            var pictLdr+i = new Loader();
    and get a syntax error.
    I can envision that this is easier with classes (for an experience object oriented programmer!). But is there a way to do this without classes?

  • UWL at SP13 and Connection status button

    Is it just me, but if you are on SP13 then the connection status button in the Universal Inbox gives no output, but the items still appear in the inbox.  I have two sp13 systems which have this problem and I know it worked before sp13.  I have another portal which is on SP12 and the connection status button works as expected.

    Hi Chuckie,
    We have not done the SP14 upgrade yet.  We have captured a series of issues in SP13 that is clearly justifying the upgrade but we just need to find the time.
    Issues that affect us include:
    - upload of files to collab rooms (866283)
    - pop-up for non-SSL warnings (872859)
    - pop-up for non-SSL warnings for Life & Work events (666182)
    - "Active Users" reporting (SDN Message)
    - The UWL stuff (676253) for the "Workflow ID" message
    I am sure that there are others but there are the direct reasons...
    We would love to leverage any info you can get from the upgrade to SP14...
    Of course, read the note on SP14 and the fixes/changes.
    I guess that we will be there late in January.
    Take care and have a nice weekend!
    Judson

  • Hello I recently downloaded an app on my iphone 4s - Remote mouse- so i can control my laptop that is connected to my tv, it used to work fine and now the connection fails, I downloaded another app and the same problem occurs, its not the firewall

    Hello I recently downloaded an app on my iphone 4s - Remote mouse- so i can control my laptop that is connected to my tv, it used to work fine and now the connection fails, I downloaded another app and the same problem occurs, its not the firewall and both phone and laptop are conected to the same wifi, i also tried to connect it manually with the ip address and still no connection, can you help??

    Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
    Then reset: hold down the home button along with the sleep/wake button until you see the apple, then let go.(No data loss) Try it again.

  • How to autopress button in another Java app?

    My mainapp should automatically press a "login" or "yes" button from another application.
    In my mainapp I have:
    private Toolkit toolkit = Toolkit.getDefaultToolkit();
    toolkit = toolkit.addAWTEventListener(new LookForLoginOrYes, AWTEvent.WINDOW_EVENT_MASK);
    public static class LookForLoginOrYes implements AWTEventListener {
       public void eventDispatched (AWTEvent event) {
          System.out.println("in LookFor..."+event.toString()); // this line is printed out!
          WindowEvent windowEvent = (WindowEvent) event;
          if (event.getID() == WindowEvent.WINDOW_OPENED) {
             System.out.println("LFA: WindowEvent.WINDOW_OPENED"); // this line is never printed
             Window window = windowEvent.getWindow();
             if (window instanceof Frame) {
                System.out.println("LFA: " + ((Frame) window).getTitle()); // never printed
    }line with event.toString() displays that my mainapp has no focus anymore of has focus (for this I replaced WINDOW_EVENT_MASK with ~0L).
    Clicking on the titlebar or so of the second app (with the 'yes' button) nothing happens.
    Security settings?

    The Robot class ties into the native interface, but has no concept of the application's components. Therefore, the only way the Robot class could perform this task is if a) you teach it to recognize the button from a screenshot of the desktop or b) you guarantee that the button is in a specific location. The Robot class is the only system-independent way to do this if your applications run in different JVMs. This is because each JVM is pretty much a seperate computer and, beyond network connections, file pipes, etc., each has no concept of the other's existence.
    Are you able to modify both applications' source? If so, I would recommend you handle your situation this way:
    public class AppOne extends JFrame
        public AppOne(...)
            JButton button = new JButton("That Button You Want To Press");
            button.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    thatButtonWasPressed();
        public void thatButtonWasPressed()
            ... // button-press code
        public static void main(String arg[])
            AppOne app = new AppOne(...);
            app.setLocationRelativeTo(null);
            app.setVisible(true);
    public class AppTwo extends JFrame
        public AppTwo(AppOne other_app, ...)
            ... // at the appropriate point, call "other_app.thatButtonWasPressed()"
        public static void main(String arg[])
            AppOne app_one = new AppOne(...);
            AppTwo app_two = new AppTwo(app_one, ...);
            app_one.setLocationRelativeTo(null);
            app_one.setVisible(true);
            app_two.setLocationRelativeTo(null);
            app_two.setVisible(true);
    }In this example, the button is not actually being pressed, but the same effect is generated. I recommend this approach because it cuts out a lot of potential interference. Why deal with the user interface if you don't have to? What you seem to want (and correct me if I'm wrong) is for the application to perform a specific operation on your request. The fact that this operation happens to also occur when a user presses a specific button is irrelevant.
    Is there some reason you need the Swing/AWT system to actually think the button has been pressed? If you can't modify the source code of the one application, that would make sense.

  • Call another gui

    hi i m new at java fx, and i want to know how i call a gui from another gui when i press a button. For example i have mi java fx gui: loguin, and another jafa fx gui:principal. When i press the login button it should appear the principal. I designed both guis with netbeans 6.9 but i dont know who to conect both.

    You have to switch scenes. If you search this forum, you will find several examples how to do it.
    An alternative for small, transient dialogs like a login one, is to create a new stage: it will appear as a new window.

  • How to tackle the dataflow problem when Value Change event always triggers after another GUI event

    We know that Value change event always triggers after another GUI event. Eg, the user modifies string control, the user clicks on a boolean control. Then event boolean clicked is triggered before event string control value change.
    Now suppose somehow the GUI event that must happen to subsequently trigger the Value change event can potentially affect the data that Value change event is supposed to work on. How can we tackle this problem ?
    For example, in a mockup application that the grand purpose is to have user entered values in a textbox logged to a file (no missing information is accepted, and there is a boolean to determine how the information is logged).
    There are 2 controls, boolean A when clicked (mouse down) will load random number in text box B. Text box B is designed with event structure VALUE change which saves whatever values user enters into text box B to a log file.
    There are 3 problems when instead of clicking anywhere on the front panel after modifying text box B, the user ends up clicking on boolean control A.
    1. Event mouse down on Boolean control A will execute first, modifying text box B content before the user entered values in B get saved.
    2. The value of boolean A can potentially affect how textbox B is loggged.
    3. The value of boolean A affects how the file is logged and this is indeterminate. Somehow when running this VI with no Highlighting, the textbox B Value change event executes -before- boolean A value is updated (F to T). When running this VI with Highlighting, the boolean A value is updated (F to T) (because we click on it) -before- textbox B value change event occurs. Why is it like this ?
    Now the situation I made up seems non-sense, but I believe it resembles one way or another a problem that you might run into. How would you solve this problem elegantly ?
     

    You can set the string control to "update while typing".
    Are you sure appending the log to itself is reasonable? Wouldn't it grow without bounds if the users keeps entering strings or pressing the ingore button?
    Why isn't the "constant" a diagram constant instead of a control. Is the user allowed to change it?
    To reset just write empty strings or a false to local variables of the controls (renit to defaults" seems a bit heavy handed).
    All you probably need is a single event case for "ignore:value change" and "String" value changed", no need for the local variable..
    Also add a stop button and an event for it.
    You don't need the timeout event.
     

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • I would like to know how i can share my music using an UPnp protocole. I have an Imac but when i'm chosing the option share my file i can connect my mac to another network reader . it seems that the protocole used is not UPnp. I need this to be in UPnp.

    I would like to know how i can share my music using an UPnp protocole. I have an Imac but when i'm chosing the option share my file i can connect my mac to another network reader . it seems that the protocole used is not UPnp. I need this to be in UPnp. does somebody can help ?

    Google "upnp mac"

  • I am losing network connection and a message"another devise is using you IP address

    I am losing network connection and get amessage "another devise is using your computers IP adress"

    http://osxdaily.com/2010/09/19/another-device-on-the-network-is-using-your-compu ters-ip-address/

  • HHola I update my Apple TV and I am frozen screen with the photo of Apple TV and iTunes symbol and a cable connected from one to another device, it happens and how to fix it Apple TV

    HHola I update my Apple TV and I am frozen screen with the photo of Apple TV and iTunes symbol and a cable connected from one to another device, it happens and how to fix it Apple TV

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)

  • Connect a phone to another phone

    Hello,
    I try to connect a phone to another phone with the bluetooth api (jsr 82).
    I have a phone which searches all bluetooth devices around him.
    After the user select one device and send something to the device via a l2cap connection.
    But the connection fails every time.
    Here my code:
    String connString = "btl2cap://"+
    remoteDevice.getBluetoothAddress()+
    ":1001;ReceiveMTU=256;TransmitMTU=256";
    L2CAPConnection client;
    try {
         client = (L2CAPConnection)Connector.open(connString);
    } catch (BluetoothConnectionException e) {
         showAlert(e.getClass().getName(), e.getStatus()+"", deviceForm);
    } catch (IOException e) {
         showAlert(e.getClass().getName(), e.getMessage(), deviceForm);
    }I recieve a BluetoothConnectionException with the state: FAILED_NOINFO.
    Please help me.
    Message was edited by:
    chabfive

    See here for help: https://discussions.apple.com/docs/DOC-3141

  • Want to connect my ipod to another ipod via bluetooth ????

    want to connect my ipod to another ipod via bluetooth ???? and send and reciev files can i do so ????

    You can with this app. There may also be other apps too.
    App Store - Bluetooth FileShare
    Connie99, be careful when you say there are no solutions.

  • Is it possible to connect one OIP to another OIP?

    I have 2 Oracle Instant Portals setup and I need to be able to go back and fore between them. Is it possible to connect one OIP to another OIP?
    Background Information - One of the OIP is our company Intranet and the other one contains all Executive level reports. I will like to have the ability for an executive manager to login to the Intrant OIP and then a link to the Executive OIP.
    Any instructions or information would be help me a lot! Thanks in advance!

    use a line like:
    private com.sun.tools.javac.Main javac = new com.sun.tools.javac.Main();
    and run javac.compile() on your code. you write a file that is name.java using fileIO right? then compile it and run it!
    here is a good tutorial:
    http://www.javaworld.com/javatips/jw-javatip131.html?#

Maybe you are looking for