How to undo last created textField

Hello
I am creating Multiple textFields using a add textfield Function
I am unable to delete the textField using delete text function
getChildIndex
getChildByName
RemoveChildAt
mostly it shows , Null child in response
or out of bound Index
How I can delete the created Any of the textFiled  ??

assuming you are doing all this code from within a DisplayObjectContainer or one of it's subclasses
you can add a property to the class say var lastTextField:TextField
and then override the addChild function
override public function addChild(child:DisplayObject):void
     if (child is TextField)
          lastTextField = child;
     super.addChild(child);
you will also need to add a function
private function removeLastTextField():void
     if (lastTextField != null)
          if (contains(lastTextField))
               removeChild(lastTextField);
          else
               trace("lastTextField has a different parent: " + lastTextField.parent);
          lastTextField = null;
     else
          trace("no textfield to remove");
you can then remove the last added TextField by calling
removeLastTextField();
if you want to be able to undo more than just the last one you would need to use an array of TextFields instead

Similar Messages

  • How to "undo" a create event in Struts

    HI,
    I'm using ADF and Struts/JSP.
    I need to know how I should undo a "Create" event on a iterator in the binding container using Struts. I Create a blank row by invoking the Create action, bound to an iterator, in the binding container. This works just fine - a blank row is created and the JSP-form is blank.
    But, when the user hits the "Cancel" button, how do I then remove the blank-row created by the Create action from the iterators/bindings? I've tried some different thing, like getting the RowsetIterator and invoke the removeCurrentRow* methods. I've tried to invoke af Rollback action, but nothing does the job well.
    How do I cancel a blank row?
    Regards
    Jacob

    I have been working on same problem. I came to following conclusion. There are two ways to handle:
    1. Subclass: WebView doesn't forward touch events by blocking in hitTest function. But link clicking works
    2. Transparent subview of WebView: Touch events obtained through transparent view can be forwrded to scrollview subview of webView and all seems working. But link linking fails. It seems like touch event for link clicking is handled by webView only. It does it before other touch events are processed. So there is no point in passing those touch events to webView. WebView doesn't expose way to handle click handling.
    Correct me if wrong. If someone has solution please post.

  • How can I include in my VI actions like "Undo last action/redo last action"?

    I built a Vi and I want to include functions like Undo (last action) and Redo (last action).
    Any suggestion wellcome.
    Thank you

    Hi
    If you have the Menu Bar visible when your VI runs - this Forms your Default VI run-time Menu. You will discover a built in Undo and Redo Functions under "Edit" Menu. This fuction can be added to your custom Menus or .rtm files.
    However, this undo fuctionality is limited to data change only, which means it will erase the last control change. This Undo will not reverse any data propagated as a result of your last control change. Here is an example.
    Say you are taking a continuously polled value of a String control and building a Path using this, and you have a Button that says "Process Path" which ends the polling and brings you out of the While Loop. In this example if you change the value of String Control and Say Undo you will be reverted to Previo
    us Value. However If after changing the Value you Clicked the "Process Path" Button, you will be Out of your While Loop with the Path being built with the Last value of String Control before "ProcessPath" was clicked. Now Clicking Undo tries to Reverse the Last Control Which was "Process Path" This has no effect on Path Value. The Undo Function will not reverse the Data which has Propagated and take you backwards in the diagram. It will simply reverse the Data Changed on the last Control.
    Therefore if you want a robust "Undo" and "Redo" you will have to program this functionality, Basically you will have to trap values of all controls and on data change remember these values. On Undo you can then Change the values of Controls back to Previous Value and Also take your Diagram back to Where the Last action had impacted any data propagation.
    All this - mind you - is for a single level undo. It will get complex to do Multiple Level Undo.
    Good Luck! Dont you wish, you could Just
    Undo the Computer Age?!!
    Mache
    Good Luck!
    Mache

  • I found My iPhone contacts on my friends Iphone we both have 4s! But we use the same apple ID and ICloud ID! How can undo what happened? all my private stuff is now on his phone!!! help me plz!!?

    I found My iPhone contacts on my friends Iphone we both have 4s! But we use the same apple ID and ICloud ID! How can undo what happened? all my private stuff is now on his phone!!! help me plz!!?

    Of course if you are both connected to the same iCloud account you have the same contacts - what did you expect?. The contacts live on the server and are read from there by the devices; so as you've both managed to sync your contacts up to iCloud they are now inextricably mixed. You can only delete your contacts by deleting individual ones, and doing that will delete them from your phone as well.
    You can only unravel this by
    1. In the iCloud contacts page at http://icloud.com, select all the contacts, click on the cogwheel icon at bottom left and choose 'Export vCard'.
    2. Sign out of System Preferences>iCloud
    3. Create a new Apple ID and open a new iCloud account with it for your own use.
    4. Import the vCard back into the iCloud contacts page.
    5. Go to http://icloud.com and sign in with the original ID. This is now his ID. Work through the contacts individually deleting the ones you don't want him to have. When done sign out and advise him to change his password.
    6. Go to the new iCloud account and delete his contacts individually.
    Of course if you have also been syncing calendars and using the same email address there are problems with doing this.

  • How to print last page in sap script in ladscape format?

    Hi all,
    can any 1 tell me How to print last page in sap script in ladscape format?
    Thanks In advance.
    Pravin

    Hi Pravin Sherkar,
    we can do this in SAP Scripts.
    we need to create two pages, one of landscape and another of potrait.
    now after filling the data at last we need to call the page which is of format landscape using START_FORM  function module.
    You can use condition &PAGE& = &FORMPAGES&.
    Please check this link
    Printing Portrait/Landscape in sapscript
    Re: Landscape and potrait in same layout?
    http://www.sap-img.com/ts013.htm
    Best regards,
    raam

  • How to write last 48bits of a bouble variable

    hi,
    i would like to know how to write last 48bits of double type variable. i am trying create a certain memory format. it needs a 48bits of a one data point. since we C doen't have 48bit variable i created double variable. now i am trying to write last 48bits of this double.(most significant bits). any help would be appreciated.
    Thanks,

    Double variables are treated by CVI according to IEEE 754 standard, which means the 64 bits are organized in groups to represent sign, exponent and mantissa of a floating point library. For this reason it seems to me that you may come into troubles by attempting to use some bits only of a double variable.
    If you are not treating floating point numbers, you may consider to use '__int64' data type instead which is supported by CVI starting from release 7.0 on or the equivalent 'long long' data type introduced in CVI 8.5: both describe 8-bytes integers.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to find last DML operation in oracle ADF

    how to find last DML operation in oracle ADF
    Please help me
    Thanks
    Damby

    In the base EntityIml class, just override doDML() method as I said.
    (see http://docs.oracle.com/cd/E16162_01/web.1112/e16182/appendix_mostcommon.htm
    "Methods for Creating Your Own Layer of Framework Base Classes")
    So, put a some flag in the session.
    You should not call doDML() method in backing bean, it will be called by framework.
    In the backing bean, you only have to get that information from the session, as follows:
    String last_dml_op = (String)ADFContext.getCurrent().getSessionScope().get("last_dml_op");And voila...

  • How do I automatically create bookmarks in adobe using the Scanjet pro 3000 s2?

    How do I automatically create bookmarks in adobe using the Scanjet pro 3000 s2?

    Does the file you are writing have a timestamp in it?  If so you could read the timestamp from the last time it was written and see if the day has changed, handling the name of the file appropriately.  The easiest way to record the timestamp is probably to write the timestamp as the number of seconds that have elapsed since 12:00 am on Firday January 1st 1904 in UT.  The "Get Date/Time in Seconds" function will give you this value.
    Message Edited by jmcbee on 03-05-2009 12:56 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • How is the library creat

    This is a technical question to any Creative staff. On the Zen Xtra (and maybe others) how is the library created? I used Media Monkey to load all my music on, MM recognises the Zen Xtra as one of its supported players and everything transfered fine but the library was not created correctly.
    How does this library get updated or created, does it use the tags on MP3's or must the floder structure be set correctly? If it is tags are these ID3V or ID3V2? If it is a folder structure what should the structure be?
    I am just trying to get a handle on why my library was not created.
    Many thanks
    J

    Having had problems over the last few days getting a connection to my PC to upgrade the firmware, finally I got it working but ended up having to also wipe my music off. The reason for the upgrade was a problem getting the library to update.
    So over the last 48 hours I have loaded all my music back on and still no **bleep** update to the library.
    I really need to understand how this works so that I can actually use my player. I use Media Monkey to load music on which recognises the Zen Xtra and apparently copies everything across just fine as seen in Windows Explorer just no library so nothing to play.
    Would someone please take the time to explain how this works so that I might eventually be able to use my Xtra.
    Thank you

  • How to undo permanent applying clipping mask,

    Hello,
    I hope somebody can help me.
    I'm having some trouble with the adjustment layers.
    I've made a selection that I want to brighten a bit, and then I make a selection in the wanted area, and choose "curves" in the adjustmenlayers to brighten the selected area.
    Then I also want to remove a little red, from only that selected area, and then i choose "colorbalance" and I "alt-click" between to two layers to adjust only the wanted area and not the whole picture, and it shows by a little "broken arrow" that it uses the previous layer to create the clipping mask.
    And that just works so great!
    But not any more!
    Because now it suddently applies this clippingmask permannetly - without me "alt-clicking". So, now when i choose "curves" the little broken arrow is there! And that annoys me big time, because I can't figure out how to make it stop. I know that I can "right-click" and click "release clippingmask" but my point is, I don't wanna do that, I want to make it stop doing that, unless I tell it to, by "alt-clicking" betwwen the layers.
    I've browes severeal forums, and the only thing I can find is how to make the clippingmask, not how to undo it (Undo it permanently, that is...)
    It must me some kind of settings... But I can't figure it out. Can somebode please help me?
    Thank you
    /Hanne

    From the adjustments panel flyout menu uncheck Clip to Layer:
    MTSTUNER

  • How to store JcomboBox n textfield into textfile? Urgent!!!

    How to store JcomboBox n textfield into textfile?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.text.DecimalFormat;
    import java.io.*;
    public class RecordMenu extends JPanel implements ActionListener {
        private JComboBox monthSelection;
        private JButton buttonOk;
        double amtToTrack;
        private JTextField amtField;
        private static final String[] Months =
         new String[] {
             "January",
             "February",
             "March",
             "April",
             "May",
             "June",
             "July",
             "August",
             "September",
             "October",
             "November",
             "December"
        public RecordMenu() {      
            JPanel mainPanel = new JPanel();
            mainPanel.setLayout(new GridLayout(4,2));
            mainPanel.setBorder(new TitledBorder("Record Expenses"));
            JLabel monthLabel = new JLabel("Select month");      
            monthSelection = new JComboBox(Months);      
            monthSelection.addActionListener(this);
            JLabel label2 = new JLabel("Amount to track:");       
            JTextField amtField = new JTextField(5);
            amtField.addActionListener(this);
            JLabel nothing1 = new JLabel("nothing");
            nothing1.setVisible(false);
            JLabel nothing2 = new JLabel("nothing");
            nothing2.setVisible(false);
            JLabel nothing3 = new JLabel("nothing");
            nothing3.setVisible(false);
            JLabel nothing4 = new JLabel("nothing");
            nothing4.setVisible(false);
            JLabel nothing5 = new JLabel("nothing");
            nothing5.setVisible(false);
            JLabel nothing6 = new JLabel("nothing");
            nothing6.setVisible(false);
            JLabel nothing7 = new JLabel("nothing");
            nothing7.setVisible(false);
            JLabel nothing8 = new JLabel("nothing");
            nothing8.setVisible(false);
            mainPanel.add(monthLabel);
            mainPanel.add(monthSelection);
            mainPanel.add(nothing1); 
            mainPanel.add(label2);
            mainPanel.add(amtField);
            mainPanel.add(nothing2);
            mainPanel.add(nothing3);
            mainPanel.add(nothing4);
            mainPanel.add(nothing5);
            mainPanel.add(nothing6);
            mainPanel.add(nothing7);
            JButton buttonOk = new JButton("OK");     
            buttonOk.addActionListener(this);
            mainPanel.add(buttonOk);
            add(mainPanel);      
            setSize(400,300);
            setVisible(true);
        public void actionPerformed(ActionEvent e) {                
             if (e.getSource() == buttonOk) {
             double amtToTrack = 0.0;
             try {
             if (!amtField.getText().equals(""))
                   amtToTrack = Double.parseDouble(amtField.getText());
             catch (NumberFormatException numberFormatException) {
                  JOptionPane.showMessageDialog(this, "You must enter numbers","Invalid Number Format", JOptionPane.ERROR_MESSAGE);
                         try{               
                             BufferedWriter out = new BufferedWriter(new FileWriter("mySaved.txt",true));
                             out.write("For Month "+Months);
                             out.newLine();
                             if (!amtField.getText().equals("")) {     
                             amtToTrack = Double.parseDouble(amtField.getText());
                             out.write("Amount to track = "+amtToTrack);   
                             out.newLine();     
                             out.close();
                             JOptionPane.showMessageDialog(this, "Saved!");                         
                            catch(IOException ex) {   
                            ex.printStackTrace(System.err);
        public static void main(String[] args) {
            JPanel p = new RecordMenu();
            JFrame f = new JFrame();
            Container c = f.getContentPane();
            c.add(p);
            f.pack();
            f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              f.setVisible(true);
    }

    i had save e month at mySavedTotal
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.text.DecimalFormat;
    import java.io.*;
    public class RecordMenu extends JPanel implements ActionListener {
        private JComboBox monthSelection;
        private JButton buttonOk;
        double amtToTrack;
        private JTextField amtField;
        private static final String[] Months =
         new String[] {
             "January",
             "February",
             "March",
             "April",
             "May",
             "June",
             "July",
             "August",
             "September",
             "October",
             "November",
             "December"
        public RecordMenu() {      
            JPanel mainPanel = new JPanel();
            mainPanel.setLayout(new GridLayout(4,2));
            mainPanel.setBorder(new TitledBorder("Record Expenses"));
            JLabel monthLabel = new JLabel("Select month");      
            monthSelection = new JComboBox(Months);      
            monthSelection.addActionListener(this);
            JLabel label2 = new JLabel("Amount to track:");       
            amtField = new JTextField(5);
            amtField.addActionListener(this);
            JLabel nothing1 = new JLabel("nothing");
            nothing1.setVisible(false);
            JLabel nothing2 = new JLabel("nothing");
            nothing2.setVisible(false);
            JLabel nothing3 = new JLabel("nothing");
            nothing3.setVisible(false);
            JLabel nothing4 = new JLabel("nothing");
            nothing4.setVisible(false);
            JLabel nothing5 = new JLabel("nothing");
            nothing5.setVisible(false);
            JLabel nothing6 = new JLabel("nothing");
            nothing6.setVisible(false);
            JLabel nothing7 = new JLabel("nothing");
            nothing7.setVisible(false);
            JLabel nothing8 = new JLabel("nothing");
            nothing8.setVisible(false);
            mainPanel.add(monthLabel);
            mainPanel.add(monthSelection);
            mainPanel.add(nothing1); 
            mainPanel.add(label2);
            mainPanel.add(amtField);
            mainPanel.add(nothing2);
            mainPanel.add(nothing3);
            mainPanel.add(nothing4);
            mainPanel.add(nothing5);
            mainPanel.add(nothing6);
            mainPanel.add(nothing7);
            buttonOk = new JButton("OK");     
            buttonOk.addActionListener(this);
            mainPanel.add(buttonOk);
            add(mainPanel);      
            setSize(400,300);
            setVisible(true);
        public void actionPerformed(ActionEvent e) {                
             if (e.getSource() == buttonOk) {
             double amtToTrack = 0.0;
             try {
             if (!amtField.getText().equals(""))
                   amtToTrack = Double.parseDouble(amtField.getText());
             catch (NumberFormatException numberFormatException) {
                  JOptionPane.showMessageDialog(this, "You must enter numbers","Invalid Number Format", JOptionPane.ERROR_MESSAGE);
                         try{               
                             BufferedWriter out = new BufferedWriter(new FileWriter("mySavedTotal.txt",true));
                             out.write("For Month "+monthSelection.getSelectedItem());
                             out.newLine();
                             if (!amtField.getText().equals("")) {     
                             amtToTrack = Double.parseDouble(amtField.getText());
                             out.write("Amount to track = "+amtToTrack);   
                             out.newLine();     
                             out.close();
                             JOptionPane.showMessageDialog(this, "Saved!");
                             JPanel p = new CheckBox();         
                             JFrame f = new JFrame();         
                             Container c = f.getContentPane();         
                             c.add(p);         
                             f.pack();         
                             f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);         
                             f.setVisible(true);                              
                            catch(IOException ex) {   
                            ex.printStackTrace(System.err);
        public static void main(String[] args) {
            JPanel p = new RecordMenu();
            JFrame f = new JFrame();
            Container c = f.getContentPane();
            c.add(p);
            f.pack();
            f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              f.setVisible(true);
    }then i save data from other file in mySavedTotal again
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.text.DecimalFormat;
    import java.io.*;
    public class CheckBox extends JPanel implements ItemListener, ActionListener {
         private JPanel checkPanel, buttonPanel;
         private JCheckBox transport, bills, food, gifts, leisure, others;
         private JTextField transportField, billsField, foodField, giftsField,leisureField,
                        othersField, totalField;
         double transportAmt, billsAmt, foodAmt, giftsAmt, leisureAmt, othersAmt, totalAmt;
         private JButton buttonTotal, saveButton, dontSaveButton;
         private JLabel showTotal;
         public CheckBox() {          
              //create a panel for diaplaying the checkboxs and buttons
              checkPanel = new JPanel();
              checkPanel.setLayout(new GridLayout(7,3));
              //Create the check boxes.
              transport = new JCheckBox("Transport");
              transport.setSelected(false);
              transport.setBounds(10,30,80,30);
              transportField = new JTextField();
              transportField.setEditable(false);
              transportField.setBounds(100,35,45,20);
              bills = new JCheckBox("Bills");
              bills.setSelected(false);
              bills.setBounds(10,60,80,30);
              billsField = new JTextField(5);
              billsField.setEditable(false);
              billsField.setBounds(100,65,45,20);
              food = new JCheckBox("Food");
              food.setSelected(false);
              food.setBounds(10,90,80,30);
              foodField = new JTextField(5);
              foodField.setEditable(false);
              foodField.setBounds(100,95,45,20);
              gifts = new JCheckBox("Gifts");
              gifts.setSelected(false);
              gifts.setBounds(200,30,80,30);
              giftsField = new JTextField(5);
              giftsField.setEditable(false);
              giftsField.setBounds(300,35,45,20);
              leisure = new JCheckBox("Leisure");
              leisure.setSelected(false);
              leisure.setBounds(200,60,80,30);
              leisureField = new JTextField(5);
              leisureField.setEditable(false);
              leisureField.setBounds(300,65,45,20);
              others = new JCheckBox("Others");
              others.setSelected(false);
              others.setBounds(200,90,80,30);
              othersField = new JTextField(5);
              othersField.setEditable(false);
              othersField.setBounds(300,95,45,20);
              JLabel nothing1 = new JLabel("nothing");
            nothing1.setVisible(false);
            JLabel nothing2 = new JLabel("nothing");
            nothing2.setVisible(false);
            JLabel nothing3 = new JLabel("nothing");
            nothing3.setVisible(false);
            JLabel nothing4 = new JLabel("nothing");
            nothing4.setVisible(false);
            JLabel nothing5 = new JLabel("nothing");
            nothing5.setVisible(false);
            JLabel nothing6 = new JLabel("nothing");
            nothing6.setVisible(false);
            JLabel nothing7 = new JLabel("nothing");
            nothing7.setVisible(false);
            JLabel nothing8 = new JLabel("nothing");
            nothing8.setVisible(false);
            JLabel nothing9 = new JLabel("nothing");
            nothing9.setVisible(false);
            JLabel nothing10 = new JLabel("nothing");
            nothing10.setVisible(false);
            JLabel nothing11 = new JLabel("nothing");
            nothing11.setVisible(false);
              //Register a listener for the check boxes.
              transport.addItemListener(this);
              bills.addItemListener(this);
              food.addItemListener(this);
              gifts.addItemListener(this);
              leisure.addItemListener(this);
              others.addItemListener(this);
              transportField.addActionListener(this);
              billsField.addActionListener(this);
              foodField.addActionListener(this);
              giftsField.addActionListener(this);
              leisureField.addActionListener(this);
              othersField.addActionListener(this);
              checkPanel.add(transport);
              checkPanel.add(transportField);
              checkPanel.add(bills);
              checkPanel.add(billsField);
              checkPanel.add(food);
              checkPanel.add(foodField);
              checkPanel.add(gifts);
              checkPanel.add(giftsField);
              checkPanel.add(leisure);
              checkPanel.add(leisureField);
              checkPanel.add(others);
              checkPanel.add(othersField);
              checkPanel.setBounds(1,1,390,180);
              checkPanel.setBorder(new TitledBorder("Check the amount you want to track"));
              buttonTotal = new JButton("Calculate Total");
              buttonTotal.setBounds(150,140,130,30);
              buttonTotal.addActionListener(this);
              showTotal = new JLabel(" = __");
              showTotal.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
              showTotal.setBounds(290,140,100,30);
              checkPanel.add(nothing1);
              checkPanel.add(nothing2);
              checkPanel.add(nothing3);
              checkPanel.add(nothing4);
              checkPanel.add(nothing5);
              checkPanel.add(nothing6);
              checkPanel.add(buttonTotal);
              checkPanel.add(showTotal);
              checkPanel.add(nothing7);
              checkPanel.add(nothing8);
              checkPanel.add(nothing9);
              checkPanel.add(nothing10);
              checkPanel.add(nothing11);
              saveButton = new JButton("Save");
              saveButton.setBounds(90,190,100,30);
              saveButton.addActionListener(this);
              dontSaveButton = new JButton("Don't Save");
              dontSaveButton.setBounds(200,190,100,30);
              dontSaveButton.addActionListener(this);
              checkPanel.add(saveButton);
             checkPanel.add(dontSaveButton);
            add(checkPanel);       
              setSize(400,260);
              setVisible(true);
              /** Listens to the check boxes. */
              public void itemStateChanged(ItemEvent e) {
              if (e.getSource() == transport)
              if (e.getStateChange() == ItemEvent.SELECTED)          
              transportField.setEditable(true);
              else
              transportField.setEditable(false);
              if (e.getSource() == bills)
              if (e.getStateChange() == ItemEvent.SELECTED)
              billsField.setEditable(true);
              else
              billsField.setEditable(false);
              if (e.getSource() == food)
              if (e.getStateChange() == ItemEvent.SELECTED)
              foodField.setEditable(true);
              else
              foodField.setEditable(false);
              if (e.getSource() == gifts)
              if (e.getStateChange() == ItemEvent.SELECTED)
              giftsField.setEditable(true);
              else
              giftsField.setEditable(false);
              if (e.getSource() == leisure)
              if (e.getStateChange() == ItemEvent.SELECTED)
              leisureField.setEditable(true);
              else
              leisureField.setEditable(false);
              if (e.getSource() == others)
              if (e.getStateChange() == ItemEvent.SELECTED)
              othersField.setEditable(true);
              else
              othersField.setEditable(false);
              public void actionPerformed(ActionEvent event) {
              try {     
             if (event.getSource() == buttonTotal) {
                  double transportAmt=0.0, billsAmt=0.0, foodAmt=0.0, giftsAmt=0.0,leisureAmt=0.0, othersAmt=0.0, totalAmt=0.0;
                   if (!transportField.getText().equals(""))
                   transportAmt = Double.parseDouble(transportField.getText());
                   if(!billsField.getText().equals(""))
                   billsAmt = Double.parseDouble(billsField.getText());
                   if(!foodField.getText().equals(""))
                   foodAmt = Double.parseDouble(foodField.getText());
                   if(!giftsField.getText().equals(""))
                   giftsAmt = Double.parseDouble(giftsField.getText());
                   if(!leisureField.getText().equals(""))
                   leisureAmt = Double.parseDouble(leisureField.getText());
                   if(!othersField.getText().equals(""))
                   othersAmt = Double.parseDouble(othersField.getText());
                   totalAmt = transportAmt + billsAmt + foodAmt + giftsAmt + leisureAmt + othersAmt;
                   showTotal.setText("= $" + totalAmt);
              catch (NumberFormatException numberFormatException ) {
                        JOptionPane.showMessageDialog(this, "You must enter numbers!","Invalid Number Format", JOptionPane.ERROR_MESSAGE);
                   if (event.getSource() == dontSaveButton) {
                        System.exit(0);
                        if(event.getSource() ==saveButton){     
                        double transportAmt=0.0, billsAmt=0.0, foodAmt=0.0, giftsAmt=0.0,leisureAmt=0.0, othersAmt=0.0, totalAmt=0.0;      
                        try{
                             BufferedWriter out = new BufferedWriter(new FileWriter("mySavedTotal.txt",true));
                             if (!transportField.getText().equals("")) {     
                             transportAmt = Double.parseDouble(transportField.getText());
                             out.write("Transport = "+transportAmt);   
                             out.newLine();     
                             if(!billsField.getText().equals("")) {     
                             billsAmt = Double.parseDouble(billsField.getText());     
                             out.write("Bills = "+billsAmt);     
                             out.newLine();     
                             if(!foodField.getText().equals("")) {     
                             foodAmt = Double.parseDouble(foodField.getText());     
                             out.write("Food = "+foodAmt);     
                             out.newLine();     
                             if(!giftsField.getText().equals("")){     
                             giftsAmt = Double.parseDouble(giftsField.getText());     
                             out.write("Gifts = "+giftsAmt);     
                             out.newLine();
                             if(!leisureField.getText().equals("")){     
                             leisureAmt = Double.parseDouble(leisureField.getText());     
                             out.write("Leisure = "+leisureAmt);     
                             out.newLine();     
                             if(!othersField.getText().equals("")) {     
                             othersAmt = Double.parseDouble(othersField.getText());     
                             out.write("Others = "+othersAmt);     
                             out.newLine();     
                             out.write("Total amount "+showTotal.getText());
                        out.newLine();                              
                             out.close();
                             JOptionPane.showMessageDialog(this, "Everything is saved!");
                             catch(IOException e){
                                  JOptionPane.showMessageDialog(this, "You must enter integers!","Invalid Number Format",JOptionPane.ERROR_MESSAGE);
                        public static void main(String[] args) {                         
                             JPanel p = new CheckBox();
                        JFrame f = new JFrame();
                        Container c = f.getContentPane();
                        c.add(p);
                        f.pack();
                        f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                          f.setVisible(true);
                        }urgent... how to rerieve saved data? i got try b4 but didnt work out

  • How to Undo a Reset cheque

    I have mistakenly reset a cheque lot using FCHG. i want to reset one cheque but mistakenly I rest the complete lot. The cheque lot included the cleared cheques. So please advice me how to undo this one as many of the cheque were presented & cleared from the Bank.
    Thanks in Advance.
    Regards,
    Irufan

    Hi ali,
    These information need for you.
    Deleting or Resetting Check Information
    Delete check information for payment run
    If the print program crashes, the print management file will be incomplete in respect of the
    following information: The information stored in the check information file up to the time of the
    crash. The check forms generated by the print program. Since there is also no way of verifying
    whether the data so far generated is consistent, you have no option but to delete the check
    information on the payment run.
    To do this, choose Environment → Check information → Delete → For payment run. On the
    next screen, enter the data for the payment run in question and choose EXECUTE.
    In addition to this, you must also delete from the print management files the print jobs that were
    generated. After this you can rerun the print program.
    Deleting Information on Manually Created Checks
    You can delete information about a manually created check in the following cases: If you
    specified an incorrect check number when entering the check number. If a check payment was
    unexpectedly not made.
    To do this, choose Environment → Check information → Delete → Manual checks.
    Deleting Information on Unused Voided Checks
    If an unused check was incorrectly voided, you must also delete the information stored for this
    check as follows:
    Choose Environment → Check information → Delete → Voided checks. On the next screen,
    enter the paying company code and the relevant check numbers.
    Resetting Void Check Data
    If an issued check was mistakenly voided, you can reset the data (void reason code, user etc.)
    contained in the check information so that the check is designated as a valid check again and
    can be cashed by the recipient.
    Choose Environment → Check information → Delete → Reset data
    Resetting Data on Cashed Checks / Extracts
    If the wrong checks were selected for manual cashing or if an update was carried out when
    creating an extract, although the file should only be created for test purposes, the incorrect check
    information can be corrected as follows:
    Choose Environment → Check information → Delete → Reset data.
    Regards,
    G Rajendhar.

  • How to undo "Forget about this site" to restor my history???

    how to undo "Forget about this site" to restor my history
    i use this item in right click in history window
    what do i do?

    Using "Forget About This Site" will remove everything from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious if you need to keep passwords or other data from that site and you can't recover from that unless you have a backup of the affected files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • How are deliveries automatically created from scheduling agreement?

    How are deliveries automatically created from the schedule line of the scheduling agreement? Can anybody explain this step by step? Can we use the code VL10BATCH for this purpose? If we can, how is this code used?
    Thanks in advance.

    hi
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity.
    The scheduling agreement is used as a basis for delivering a material. The customer sends in scheduling agreement releases, referred to as delivery schedules, at regular intervals to release a quantity of the material.
    Document Types
    To configure document types for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Header -> Define sales document types in Customizing for Sales and Distribution.
    The R/3 System contains the following document types for component suppliers:
    LZ - Scheduling agreement with delivery schedules (no external agents)
    LZM - Scheduling agreement with delivery orders
    LK - Scheduling agreement with delivery schedules (external agents)
    ED - Delivery by external agent (consignment issue)
    EDKO - External agent correction
    RZ - Scheduling agreement returns (no external agents)
    KAZU - Consignment pick-up for external agents
    KRZU - Consignment returns for external agents
    Item Categories
    To configure item categories for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Item -> Define item categories in Customizing for Sales and Distribution.
    The system determines the following item categories for the related document types in
    documents containing materials with item category group NORM:
    Item category LZN for scheduling agreement type LZ
    Item category LZMA for scheduling agreement type LZM
    Item category LKN for scheduling agreement type LK
    Item category KEN for document type ED
    Item category EDK for positive corrections (or the manual alternative EDK1 for
    negative corrections) for document type EDKO
    Item category REN for document type RZ
    Item category KAN for document type KAZU
    Item category KRN for document type KRZU
    Schedule Line Categories
    To configure schedule line categories for scheduling agreements, choose Sales -> Sales Documents -> Schedule lines -> Define or Assign schedule line categories in Customizing for Sales and Distribution.
    The R/3 System contains the following schedule line categories for component suppliers:
    L1, BN, L2, and CN for item category LZN
    E4, E0, E5, and BN for item category LKN
    L2 for item category LZMA (standard for delivery order processing)
    Schedule Line Types
    To configure schedule line types for scheduling agreements, choose Sales -> Sales Documents -> Scheduling Agreements with Delivery Schedules -> Define schedule line types in Customizing for Sales and Distribution.
    Creating Scheduling Agreements
    To create a scheduling agreement with delivery schedules:
    1. In the Sales menu http://Ext. choose Scheduling agreement ->Create.
    2. Enter scheduling agreement type LK (standard) or LZ (external agents) and the
    relevantorganizational data.
    3. Choose ENTER.
    4. Enter the following data:
    Sold-to or ship-to party number
    Purchase order or closing number
    Material or customer material number
    You can use the Description field to identify the scheduling agreement. For
    example,
    you could enter the model year for a particular production series.
    The system allows up to 35 digits for a customer material number.
    Rounding quantity
    Usage
    Choose Goto -> Header -> Sales to enter the usage at header level, or Goto ->
    Item-> Sales A to enter it at item level. The system proposes usage S, for series, as default in both cases.
    Planning indicator
    Choose Goto -> Header ->Sales.
    Target quantity
    Mark an item and choose Goto -> Item -> Sales A
    Partners
    For scheduling agreements with external agents , choose Goto -> Header
    ->Partners to enter the external agent as forwarding agent and special stock partner
    on the partner function screen.
    5. Create a delivery schedule
    Mark an item in the scheduling agreement and choose Goto -> Item -> <Delivery
    schedule>. Enter:
    A delivery schedule number and date
    The cumulative quantity received by the customer
    The last delivery confirmed by the customer
    A schedule line with date, time, and quantity
    To enter additional data in the delivery schedule, choose DlvSch.Hdr (delivery schedule header).
    configuration:
    img->SD->Sales->sales document->scheduling agreements with delivery schedules->
    step1: define schedule line types
    schedule line types are not schedule line categories. Schedule line types are used for information purpose only.
    stds are 1. fixed date 2. backlog 3. immediate requirement
    4. estimate
    step2: maintain planning delivery sched. instruct/splitting rules
    The planning delivery schedule is an internal delivery schedule used to plan requirement s more efficiently.  It is sub divided into 3 parts
    2.1 delivery schedule splitting rules
    2.2 dly schedule instrusctions
    2.3 assign dly schedule splitting rules
    step3: define sales documents type
    step4 : define item categories
    step5: define schedule line categories
    step6: maintain copy control
    PROCESS
    step1:  create scheduling agreement
    VA31
    enter SP,SH valid from, valid to,
    goto ITEM OVERVIEW tab
    enter material, rouding qty
    select ITEM  click on FORECAST DLSCH
    enter different dly dates and qties
    save it.
    step2: create sales order with reference to above
    step3: create delivery
    step4: create billing
    regards
    krishna

  • Dynamically created textfields problem

    Hi people,
    I have a strange problem here: I want to create textfields
    dynamically that are just big enough to hold the text to display.
    The textfields use a font from the library. I get the metrics of
    the text with TextFormat.getTextExtent(), it seems to work ok.
    However, the last letters of the text are missing in the textfield
    after assigning the text, when the text needs more than 1 line. The
    textfield is sized for 2 lines, but the 2nd line is just empty. I
    applied wordWrap, but the text doesn't show at the 2nd line. This
    seems to be connected to the font that is used: I tested about a
    dozen different types, and only 1 of them displays always the full
    text, with all other fonts, the last 6 or so letters are missing.
    The text property of the textfields holds the complete text; where
    are the last letters?
    So, are there any known issues with textfields created
    dynamically? Or any trick to display all of the text? I'd like to
    use a monospaced font, but all I have tested have this strange
    problem.
    Attached is the code used for creatiing the textfields.
    blemmo

    Yep, the reason is I never tried that. :)
    No... I'm just about to give it a try, but I want to draw a
    fancy border around the textfield (other than the border that comes
    with the textfield), so I guess I'll need the metrics info anyway.
    Another thing is that I want the width to be not more than 150,
    gotta check if that's possible with auto-size. Have to try that
    now... thx for the input!
    blemmo

Maybe you are looking for

  • Limit send of IDoc from SAP-ERP to SAP-XI or a Non-SAP

    Hi guys, I send the following IDocs from SAP-ERP over SAP-XI to Non-SAP for an initialload: Artmas, Bommat, Infrec, Cond_a, Mmaddi, Cremas Example: Artmas with TA: BD10. Problem: SAP-ERP send all 25'000 IDoc to SAP-XI. The effect is that the qRFC and

  • Oracle XE - users

    I use Oracle XE with APEX to develop an application and I would like to be able to get into this application both as a developer and as a simple user. I would like the developer to modify the application, when needed, using ''developer'' password, an

  • THE TYPE-POOL "FIBS" IS UNKNOWN

    whenever declare and execute the this type-pool in alv program , i got this syntax  error     [ THE TYPE-POOL "FIBS" IS UNKNOWN   ]  and also i am using *abap trial  version software7.0*

  • Quicklookd quit unexpectedly-started with mavericks upgrade- help needed?

    I've been getting continuous problem reports on my mac ever since I upgraded to mavericks on quicklookd quitting unexpectedly. I use this application a lot for quick previews on jpeg and tiff files. I've looked at similar problems like this over the

  • Mac won't load, No bootable device, Keyboard not working nothing! help!

    Hello! I need some help here.... I tried to bootcamp my Mac so I can run windows 7 and Mac OS X together Followed instructions... Put the USB boot drive in.. Didn't recognice Drivers so I decided to start again and cancelled. (my mistake obviously!)