Linking frames to other frames when a button press

Hi every one new to Java in my 2 year at University College Chester,
4 week using Java to build an application, how do you link to another frame when a Jbutton is pressed sending full control to the new frame, i want to leave the old frame open as when i close the new frame i wish to return to the old frame! and would i use system.exit(0); to close the new frame as i think this closes the application altogether.
Any help Please!
Thank inadvance for help!

Just create a new JFrame and show it on button usage, maybe additionally assign the focus to one of it's components. Set the JFrames default close operation to DISPOSE_ON_CLOSE and you should be fine.

Similar Messages

  • Creating a plot on a java Frame when a button is clicked

    hi
    I want to create a plot in a java application in a frame when a button is clicked.I mean to say a
    a plot between two single dimensional arrays one as x-axis and the other as y-axis. Can u please suggest me with an example
    Thank u

    JFreeChart

  • How is when a button pressed a report will come to the same page !!!

    Hi all,
    I wonder that is it possible to bring a report to the page as a region but only when a button pressed in apex .When ı clicked the go button for example ı want to list a report in the same page.
    but I dont know how .If is this possible can you explain me please.I need help!
    Thanks!

    Create your report in a region as normal.
    Create a second region and in this region create an item eg p171_item.
    In the same region create 2 buttons
    Get Report and Reset (branching back to same page).
    Create 2 page processes (PLSQL) on submit after computations
    1. GET REPORT
    DECLARE
    v_item number;
    Begin
    select 1 into v_item from dual;
    :P171_ITEM := v_item;
    end;
    2.RESET
    DECLARE
    v_item number;
    Begin
    select 2 into v_item from dual;
    :P171_ITEM := v_item;
    end;
    Tie the processes to the buttons.
    On your report region put a condition
    PL_SQL RETURNING BOOLEAN
    IF :P171_ITEM = 1 THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    Now by pressing the buttons the report region is opened and closed.
    Now hide P171_ITEM.
    Gus

  • Show error Msg if delivery type is 'Expedited' when 'Order' button pressed

    Hi,
    In the order.jsp if the Delivery type is 'Expedited' I should show error messge when the user press the 'Order' button. The Order button is placed in closer_details.jsp.
    I thought of putting a flag but how the value would be passed between order,jsp and closer_details.jsp?
    Please help.

    Hi Harish,
    From your description of problem I assume that you are using ISA 4.0 because closer_details.jsp used in ISA 4.0 in ISA 5.0 there is no closer_details.jsp
    It can be done. You can achieve desire functionality through Java script.
    I did the same thing in one of my previous project.
    in Closer_detail.jsp you can get value of delivery type element through javascript.
    Suppose 'Delivery Type' has incoterm as id and name and it is select box.
    Frame name of order.jsp is position--you can find this frame name in frameset_order.jsp
    Create Java script function in closer_Details.jsp and check value of delivery select box. like below.
    Create Java script variable -parent.positions.document.forms['order_positions'].incoterm.options-[incoterm.selectedindex].text;
    Once you have text value of your delivery type select box you can check this value -Expedited- in if condition and display error message before submitting form.
    Call this function before submit in Closer_Detail.jsp
    You are done.
    Let me know if you face any problem.
    Regards.
    Ecommerce Developer.

  • Overide on-error with when-new-button-pressed

    Hi,
    I have a big problem and not much time to solve it so posting on here hoping someone will know the answer. I have put an exit button on my form which calls a method that uses GO_FORM to return to a menu page.
    I don't want to close oracle forms down completely so I can't use the exit_form command. However I want the close button to return the user to the menu without validating or saving the current form.
    My problem is that I catch errors in a date field using an on-error trigger and this always fires before the when-button-pressed meaning my user gets an error before leaving the form.
    How do I ignore the on-error trigger when my close button is pressed and not when exiting the field which contains the date.
    I have tried setting the execution hierarchy to after on the on-error and override on the when-button-pressed but this seems to have no effect.
    Thanks for any help
    Dan

    One solution would be to add a menu for the form. For some reason menu items and toolbar buttons don't cause the loss of focus to occur. If you used a menu to fire a trigger to close the form then you could set a flag that could be checked in your on-error trigger. If the flag was true(or whatever) then you don't perform your validation.
    I'm usually angry that the toolbars and menus don't cause those triggers to fire, but I've had a couple cases similar to this where it actually works out for the better. Not sure if having a menu for, what sounds to me like, a dialog will look the best, but it should work.

  • Try to debug the query when save button pressed

    Hi, could some body tell me how can I see the SQL statement when the trigger is executed. I have a save button, when it is pressed it does a commit to insert data to database. I would like to see a sql statement something like : "insert into xxxx (xxx,xx,...) values (xxx,xx,...). I checked the System.last_query but it still shows the select statement to get into the form. Not the actural LAST STATEMENT. please help!

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • How can I go to other page when click button??

    When I click button, the process of this button is be executed, then current page will go to other page.
    1.I setup this button's Optional URL Redirect to other page, but process is not be executed.
    2.I create a process and a branch(point: on-summit:after process...), not setup button's Optional URL. at this time, the process is be run, but not go to other page.
    please help me if you know it! Thanks a lot!

    Do you need the process to do something or do you just want to forward to the next page. In this case you just need the branch. In the configuration you can choose the button that forwards to the next page.
    Configuration in the branche:
    Target type: Page in Application
    Page: The Page you want to redirect to.
    On clicked Button: The Button you created on the page which redirects to the next page
    Hope i could help.
    Philipp

  • Quiz Issues - Not highlighting selected answers when 'back' button pressed

    Any help would be very much appreciated for this problem.
    On Captivate 5.5. and have a few quizzes with anything from 18 questions to 37, the user enters their name and it moves onto the question page.
    For example, the user answers question one and goes forward, then goes back one and the answer is no longer selected but the question is locked. When the user comes to review the quiz, it now says the question hasn't been answered when is has been and obviously doesn't get a mark.
    Anyone else experienced this or have a clue how to fix it? My preferences are as follows:

    Lilybri, I'm not sure if I explained myself well enough in my original post.
    User answers question one - presses submit button. CP moves to next question, no problem.
    User then answers question two, presses submit button.
    User moves back to question two and the button they had selected is no longer selected and the question is locked (it should be locked obviously, but CP should show which answer the user selected).
    When you review the quiz it claims 'you did not answer the question completely'. When you had selected something. Also in tests, it was found it knocked off two points from the user sometimes.
    I've just tested one this morning and it seems to be it'll sometimes happen on first go, or you have to move forward and backwards a few times for it to start up this behaviour. Any help is appreciated.
    https://apps.kcadeutag.com/cbt/CBTs/questiontester/questionsformodule1.htm
    Is a link to one of the modules.

  • Is there a way to automatically shut down laptop when power button pressed?

    Of all the things I am having to struggle through a learning curve on MacOS (converted from Windows), this might seem like a rather benign concern, but I'm going to ask anyway. . .
    I would like for my laptop to automatically go through a shutdown process when the power button is pressed - that is, bypass the dialog box that appears when hitting the power button that gives you the option to restart/shutdown, etc.
    I've looked in all of my system preferences without anything that controls the behavior of this button so I imagine there might be a terminal command or an app that might accomplish this?
    Thanks in advance for any help or advice.

    I'm trying to set up my MacOS to have the power button automatically go through the shutdown process as IF I had actually clicked on a confirmation box to shut down the computer.
    I don't know of any way of doing that... perhaps there's a 'haxie' out there that would generate a shutdown command when pressing the power button, but I don't know of one.
    Sorry,
    Clinton

  • How to resubmit the form when back button pressed

    Hi,
    In my application, iam implementing searching,
    when i submitting the form, i got some records and i navigated all the results through next and previous buttons.
    Problem occurs when i clicked on back button, it is showing "page expires and asking for resubmit the data".
    How can i show the previous page, when user clicked on back button.
    Iam using struts 1.0 and ibatis
    Please help me out.
    Thanks in advance,
    Mohan

    Hi mohan,
    try to store your search indices in a vector and put that vector in the session scope. at page first loading you get the first index from your vector and pass it in the request scope in your action class, due to the page you have to find a way to understand the passed index in request scope and translate it to the searched word location.really I have not a code sample, but it is just an idea.
    feel free to ask me.
    Thanks.
    Ahmad Elsafty

  • Siri doesn't work, apps still shake when home button pressed

    So I got my iPad mini 8 weeks ago and when you hold down the middle button siri dosent pop up anymore. I haven't updated my device to ios 7 yet because I don't have enough ICloud backup. Also when I hold down an app to delete it and then press the home button the apps still shake and don't stop. I don't know whether to take my iPad to the apple store because I don't know if it will have to reboot
    Thanks

    bobseufert wrote:
    Did you know that you can get Siri to call you by name?
    Does Siri say your name by how it is spelled or by how you've pronunced it to her? I'd hate to think of how she'd mangle my name if it went by how it was spelled.

  • 9360 not refreshing when lock button pressed.

    When I press the button at the top of my phone to lock it and then press it again to unlock it sometime later the phone time remains at the same time I locked it at for about 3 seconds and I also can't receive bbm messages etc whilst the phone is locked. Anyone have any idea why this is happening and how I can fix it?

    Assuming that you mean you did everything that Sherry
    and I offered up in our responses, then create
    another admin account, log into it, and see if the
    problem persists. Cryptic one-line responses aren't
    very helpful. If this suggestion doesn't make the
    problem disappear, then install the latest COMBO
    update (10.4.7 was released today), restart, launch
    Disk Utility, repair permissions, restart, and
    hopefully that'll fix things.
    I have another - "clean" - admin account and the problem persists there. And I downloaded the 10.4.7 update and the problem persists. If there isn't much to add, why go beyond, as you call it, a "cryptic one-line" response.
    Ended up calling AppleCare and will do a clean archive and re-install. Thanks for the suggestions.

  • NW2004s SP12, action not called when Save button pressed

    Hi Experts,
    I have a strange behaviour in my Interactive form SAVE functionality. If its a large form, the SAVE button does not call corresponding action method in the implementation.
    However it does when the form size is small eg 1.5Mb or so.
    Please advise. This is quite urgent.
    Thanks in advance
    Mona

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • Auto Number When Save Button Pressed

    Dear Sir/Madam
    I need your help about that when i Press the Save Button in Emp_code forel theres should generate auto number.
    table name personnel
    Column names: emp_code, emp_name, emp_Fname
    database name= test
    user = yassen

    hi,
    my Problem still not solved. no body can predict what problem you are facing with this kind of statement.
    if you are not able to solve the problem means you should tell where you have strucked with the provided solution, so that ppl can guide you to acheive it through.
    Edited by: GD on Oct 12, 2011 5:21 AM

  • Script to validate a field when submit button pressed not working

    I have a script to validate certain fields and generate an error message if fields are blank or not filled out correctly. Everything works fine except for one of them. I'm trying to generate an error message if one of the fields have an invalid format in it. For example, the format should be ''XXXX.XX'' (all numbers) so if they enter ''XXXX'' the error message will generate and the form will not submit. I have a function setup under this particular field and it works but unfortunately users are ignoring the error message and submitting the form anyway and this field really needs to be right before it's submitted.
    This is what I'm using for it:
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Invalid Format. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    So the problem is it generates the error message now even if the format is correct. I'm sure I did something wrong but I wrote the format the same way (/^\d{0,4}(\.\d{0,2})?$/) when I ran a custom format script under this field and it worked fine so I'm not sure what I'm doing wrong. I'm also including this part of the script with the rest of the field validations in the submit button. So altogether it looks something like this (just with a lot more fields, didn't include all of them bc it gets pretty redundant)
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Employee Name").value >= 1) {
    bCancel = false; }
    if (getField("AcctNbr1").value >= 1) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Tracking field format is invalid. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    if (getField("Employee Name").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (getField("AcctNbr1").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (bCancel){
    app.alert(strMsg);
    } else {
    this.mailDoc({
    bUI:       true,
    cTo:      "[email protected]",
    cSubject: "Form Returned: Maintenance Form"});
    I'm fairly new to scripting, especially in Adobe, so I probably didn't do a great job with all of it. Please let me know if there's anything I need to change to get it working better. Thanks in advance for your help!

    OK, below are two regular expressions that may do what you want:
    var re1 = /^\d{4}\.\d{2}$/;
    var re2 = /^[1-9]\d{3}\.\d{2}$/;
    The first, re1, will match any four digits, followed by a decimal point, followed by two digits. A potential problem with this is it will match a string like "0001.23", which may not be what you want. If you don't want it to match a string with leading zeroes, you can use the second one, re2. It will match any digit from 1 to 9, followed by any three digits, followed by a decimal point, followed by two digits.
    The test method of a regular expression takes a string as an argument and will return true if it matches the regular expression, or false if it doesn't. Here are some example outputs given various field values and methods of getting the field values:
    // Text1 field value is 0123.45
    // Get the field value.
    // The variable num will be a number, not a string
    // num will equal 123.45
    var num = getField("Text1").value;
    // Test regular expression against num
    bOK = re1.test(num);   // returns false
    // Now get the field value as a string
    // num will equal "0123.45"
    var num = getField("Text1").valueAsString;
    bOK = re1.test(num);   // returns true
    // Now use the other regular expression
    bOK = re2.test(num);  // returns false
    // Text1 field value is now 1234.56
    // num will equal "1234.56"
    var num = getField("Text1").valueAsString;
    bOK = re2.test(num);   // returns true
    To summarize, if you want to not allow leading zeroes, get the field value using the valueAsString field property, and use a regular expression that does not match a leading zero. You should probably change the regular expression you're using in the Keystroke script if you want to prevent the user from entering a number with any leading zeroes.

Maybe you are looking for