Resetting a program internally

I have a main JFrame through which multiple JDialog forms may be opened by the user. Is there any command I can type within the main frame that will dispose of all the opened forms and reset everything to how it was when the System was started?

System.exit(0);
Will get you out and everything that is in your VM will be disposed. This gets you back to where you started your system, but if you are looking to keep your JVM running and get back to the same state as you were when you started, then you cannot totally do that. At best you can kill off all of your references and at some point the garbage collector will get rid of them (probably when you close your VM).

Similar Messages

  • Exporting An message Internal table to Standard program Internal Table

    Hi,
      In T-code VOFM, We have Goods issue routine 113, Now in Custmizing 913 is Configured. we are Checking the status of each handling unit of the Delivery. So I am getting the status Incomeplete Message for Multipe HU's. hence AM storing into One internal Table and Now I want To Export That Internal Table to Standard Program Internal Table 'WAT'.
    If I raise

    Elaborate your questions Please.

  • How to call driver program internal table in a form

    how to call driver program internal table in a form? Given below is my code
    TABLES: VBRK,VBAK,ADRC,KNA1,VBRP,VBAP,J_1IMOCOMP.
    DATA: BEGIN OF IT_CUST_ADD OCCURS 0,
    STREET LIKE ADRC-STREET,
    NAME LIKE ADRC-NAME1,
    POST_CODE LIKE ADRC-PSTCD1,
    CITY LIKE ADRC-CITY1,
    CUST_TIN LIKE KNA1-STCD1,
    END OF IT_CUST_ADD.
    DATA: BEGIN OF IT_IN_DA OCCURS 0,
    VBELN LIKE VBRK-VBELN,
    FKDAT LIKE VBRK-FKDAT,
    END OF IT_IN_DA.
    now suppose these are my internal table. what should i write in FORM INTERFACE (associated type)

    Hi Sashi, this will solve ur problem.
    Check the below link.
    REG:PEFORM IN SCRIPT
    kindly reward if found helpful.
    cheers,
    Hema.

  • All my programs are opening in adobe even the system restore and the regisrty - how do I reset all programs to their originall default programs. Please help

    all my programs are opening in adobe even the system restore and the regisrty -
    how do I reset all programs to their originall default programs.
    Please help.
    PS I have also tried starting in save mode and still have the same problem.

    Hi,
    As
    BurrWalnut mentioned, first please run a virus scan to eliminate virus infection (if AV program is not opened in adobe)
    The files association could be corrupted in your situation, apart from the solution posted in the first reply, I also suggest you check Control Panel\All Control Panel Items\Default Programs\Set your Default Programs or Associate a file type or protocol
    with a progra,, manually check the association and check if it can do some help.
    Add: another way to open restore point is launching it in recovery console, please refer to this guide
    http://windows.microsoft.com/en-hk/windows/what-are-system-recovery-options#what-are-system-recovery-options=windows-7
    Yolanda Zhu
    TechNet Community Support

  • How to create a table control from a program internal table

    Hi all,
    I try to create a table control that matches following requirements :
    - the source table is an internal table from program (not a dictionary table)
    - I need to specify my own column header titles
    - the fields need to be editable
    - some of the columns fields must be displayed as checkboxes, other one as texts
    When I try using "Table Control WIth Wizard", the generated TabControl has the expected columns titles but the fields are not displayed as checkboxes. Moreoever, when I look at "Dictionnary, program Fields list", the table fields choosed using wizard are locked (a padlock is displayed in front of the line) So, I can not check "checkbox display"
    When I try using simple Table Control -I mean without ALV-, I can use the "checkbox display" for wanted fields but I don't know how to specify the resquired columns headers titles
    So, could you please help me ? How to do both : maage columsn header titles and display some of the columns as checkboxes ?
    thanks for help
    Regards
    morgan

    Hi Morgan,
    Create an Interanal Table in Top Include and activate it first. Then go the Screen Layout and Drag and Drop a Table control.
    Enter a name like TC. now press F6 (Dictionary/Program Fields Window). Enter the Interanal Table and Press
    Get From  Program Push button. Select the required Columns and transfer them. Double click on the Table Control Area only (any corner of the TC) now you get attribute window POP UP. now select the check box for with column Header or remove the available column header and place your own Text Field and  give meaningful Text for them. With in the Table control you can Drag and Drop a Check Box which will occupy all the rows. Make sure you include one more column in the TOP include type C with length one.
    Hope this is very Clear to YOU.
    Cheers
    Ram

  • IPhone 4 Case Program - international?

    I bought my iPhone 4 from France but I live in Estonia. How can I get my free case? Hasn't Apple thought of that?

    Have you tried ordering the case form the iphone 4 case program? Surely, they should be able to ship internationally.

  • Resetting all program preferences?

    I was told there is a way to reset all the preferences for programs via a series of commands in a terminal window. I want to restore my login to default as it would be if I just created it.
    Please help!

    You could create a new account, or you could rename your home Library, logout and restart. Or move aside just your ~/Library/Preferences
    The 3rd option is to reset the First Time Setup Assistant file pref and then have to go through registration screen to create a new account.

  • My firefox keeps crashing, I have updated, run in safe mode and reset the program but they keep occuring.

    Hi guys,
    I keep getting crashes and was wondering if you guys could help me find out whats up

    sure I have 6GB of Ram, I ran a pass of memtest last week when this started but they came up fine.
    I have now diasabled Adblock
    Application Basics
    Name: Firefox
    Version: 29.0
    User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
    Crash Reports for the Last 3 Days
    Report ID: bp-87c29191-6e52-4bf8-8b79-e2c032140504
    Submitted: 2 minutes ago
    Report ID: bp-1ff55e0b-b29e-44d2-81dc-e1ffe2140504
    Submitted: 10 hours ago
    Report ID: bp-274e0e24-1b66-4483-a70c-8056e2140503
    Submitted: 12 hours ago
    Report ID: bp-dc0090f4-a511-433f-a5de-ae6642140503
    Submitted: 19 hours ago
    Report ID: bp-2a2680b3-0d57-4ef5-a7a5-876f72140503
    Submitted: 24 hours ago
    Report ID: bp-791b6da6-6dca-4fd6-ab45-89a5e2140503
    Submitted: 1 day ago
    Report ID: bp-84ee48f6-cb17-4a6c-9ec4-3c31a2140502
    Submitted: 2 days ago
    Report ID: bp-ad6efd6a-f435-45b6-85d1-8bf772140502
    Submitted: 2 days ago
    Report ID: bp-48f34297-63df-4266-a43e-52d752140502
    Submitted: 2 days ago
    Report ID: bp-5b72e728-5fdf-48cb-a353-44d0f2140501
    Submitted: 2 days ago
    Report ID: bp-b672dcec-5691-4210-95c5-a60e52140501
    Submitted: 3 days ago
    Report ID: bp-eb527069-9036-4c77-a58c-3a4822140501
    Submitted: 3 days ago
    Report ID: bp-6cb78757-062f-45d8-a844-e269d2140501
    Submitted: 3 days ago
    All Crash Reports
    Extensions
    Name: Greasemonkey
    Version: 1.15
    Enabled: true
    ID: {e4a8a97b-f2ed-450b-b12d-ee082ba24781}
    Name: HTTPS-Everywhere
    Version: 3.5.1
    Enabled: true
    ID: [email protected]
    Name: Reddit Enhancement Suite
    Version: 4.3.2.1
    Enabled: true
    ID: jid1-xUfzOsOFlzSOXg@jetpack
    Name: Troubleshooter
    Version: 1.1a
    Enabled: true
    ID: [email protected]
    Name: Adblock Plus
    Version: 2.6
    Enabled: false
    ID: {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
    Important Modified Preferences
    accessibility.typeaheadfind.flashBar: 0
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size_cached_value: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.places.smartBookmarksVersion: 6
    browser.sessionstore.upgradeBackup.latestBuildID: 20140421221237
    browser.startup.homepage_override.buildID: 20140421221237
    browser.startup.homepage_override.mstone: 29.0
    dom.mozApps.used: true
    extensions.lastAppVersion: 29.0
    gfx.direct3d.last_used_feature_level_idx: 0
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1399142774
    places.history.expiration.transient_current_max_pages: 104858
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    privacy.sanitize.migrateFx3Prefs: true
    storage.vacuum.last.index: 1
    storage.vacuum.last.places.sqlite: 1399057422
    Graphics
    Adapter Description: NVIDIA GeForce GTX 760
    Adapter Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
    Adapter RAM: 2048
    Device ID: 0x1187
    Direct2D Enabled: true
    DirectWrite Enabled: true (6.2.9200.16571)
    Driver Date: 3-4-2014
    Driver Version: 9.18.13.3523
    GPU #2 Active: false
    GPU Accelerated Windows: 1/1 Direct3D 10
    Vendor ID: 0x10de
    WebGL Renderer: Google Inc. -- ANGLE (NVIDIA GeForce GTX 760 Direct3D9Ex vs_3_0 ps_3_0)
    windowLayerManagerRemote: false
    AzureCanvasBackend: direct2d
    AzureContentBackend: direct2d
    AzureFallbackCanvasBackend: cairo
    AzureSkiaAccelerated: 0
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.3
    Version in use: 4.10.3
    NSS
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSMIME
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSSSL
    Expected minimum version: 3.16 Basic ECC
    Version in use: 3.16 Basic ECC
    NSSUTIL
    Expected minimum version: 3.16
    Version in use: 3.16

  • Who can help me :)--a problem with java program(reset problem in java )

    I do not know how to make the button reset,my program only could reset diagram but button.If any one who could help me to solve this problem.The problem is When the reset button is pressed, the image should immediately revert to the black square, and the 4 widgets listed above should show values that
    correspond to the black square.The code like this,first one is shapes:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class shapes extends JFrame {
         private JPanel buttonPanel; // panel for buttons
         private DrawPanel myPanel;  // panel for shapes
         private JButton resetButton;
        private JComboBox colorComboBox;
         private JRadioButton circleButton, squareButton;
         private ButtonGroup radioGroup;
         private JCheckBox filledButton;
        private JSlider sizeSlider;
         private boolean isShow;
         private int shape;
         private boolean isFill=true;
        private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
                                   "green", "lightgray", "magenta", "orange",
                                   "pink", "red", "white", "yellow"};   // color names list in ComboBox
        private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public shapes() {
             super("Draw Shapes");
             // creat custom drawing panel
            myPanel = new DrawPanel(); // instantiate a DrawPanel object
            myPanel.setBackground(Color.white);
             // set up resetButton
            // register an event handler for resetButton's ActionEvent
            resetButton = new JButton ("reset");
             resetButton.addActionListener(
              // anonymous inner class to handle resetButton events
                 new ActionListener() {
                       // draw a black filled square shape after clicking resetButton
                     public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
                          // to decide if show the shape
                         myPanel.setShowStatus(true);
                             isShow = myPanel.getShowStatus();
                             shape = DrawPanel.SQUARE;
                         // call DrawPanel method setShape to indicate shape to draw
                             myPanel.setShape(shape);
                         // call DrawPanel method setFill to indicate to draw a filled shape
                             myPanel.setFill(true);
                         // call DrawPanel method draw
                             myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
             );// end call to addActionListener
            // set up colorComboBox
            // register event handlers for colorComboBox's ItemEvent
            colorComboBox = new JComboBox(colorNames);
            colorComboBox.setMaximumRowCount(5);
            colorComboBox.addItemListener(
                 // anonymous inner class to handle colorComboBox events
                 new ItemListener() {
                     // select shape's color
                     public void itemStateChanged(ItemEvent event) {
                         if(event.getStateChange() == ItemEvent.SELECTED)
                             // call DrawPanel method setForeground
                             // and pass an element value of colors array
                             myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
                        myPanel.draw();
                }// end anonymous inner class
            ); // end call to addItemListener
            // set up a pair of RadioButtons
            // register an event handler for RadioButtons' ItemEvent
             squareButton = new JRadioButton ("Square", true);
             circleButton = new JRadioButton ("Circle", false);
             radioGroup = new ButtonGroup();
             radioGroup.add(squareButton);
             radioGroup.add(circleButton);
            squareButton.addItemListener(
                // anonymous inner class to handle squareButton events
                new ItemListener() {
                       public void itemStateChanged (ItemEvent event) {
                           if (isShow==true) {
                                 shape = DrawPanel.SQUARE;
                                 myPanel.setShape(shape);
                                 myPanel.draw();
                   }// end anonymous inner class
             );// end call to addItemListener
             circleButton.addItemListener(
                   // anonymous inner class to handle circleButton events
                new ItemListener() {
                       public void itemStateChanged (ItemEvent event) {
                             if (isShow==true) {
                                 shape = DrawPanel.CIRCLE;
                                 myPanel.setShape(shape);
                                 myPanel.draw();
                             else
                                 System.out.println("Please click Reset button first");
                   }// end anonymous inner class
             );// end call to addItemListener
             // set up filledButton
            // register an event handler for filledButton's ItemEvent
            filledButton = new JCheckBox("Filled", true);
             filledButton.addItemListener(
              // anonymous inner class to handle filledButton events
            new ItemListener() {
                  public void itemStateChanged (ItemEvent event) {
                    if (isShow==true) {
                            if (event.getStateChange() == ItemEvent.SELECTED) {
                                  isFill=true;
                                  myPanel.setFill(isFill);
                                  myPanel.draw();
                            else {
                                isFill=false;
                                  myPanel.setFill(isFill);
                                  myPanel.draw();
                    else
                        System.out.println("Please click Reset button first");
              }// end anonymous inner class
             );// end call to addItemListener
            // set up sizeSlider
            // register an event handler for sizeSlider's ChangeEvent
            sizeSlider = new JSlider(SwingConstants.HORIZONTAL, 0, 300, 100);
            sizeSlider.setMajorTickSpacing(10);
            sizeSlider.setPaintTicks(true);
            sizeSlider.addChangeListener(
                 // anonymous inner class to handle sizeSlider events
                 new ChangeListener() {
                      public void stateChanged(ChangeEvent event) {
                          myPanel.setShapeSize(sizeSlider.getValue());
                             myPanel.draw();
                 }// end anonymous inner class
             );// end call to addChangeListener
            // set up panel containing buttons
             buttonPanel = new JPanel();
            buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
             buttonPanel.add(resetButton);
             buttonPanel.add(filledButton);
            buttonPanel.add(colorComboBox);
            JPanel radioButtonPanel = new JPanel();
            radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
            radioButtonPanel.add(squareButton);
            radioButtonPanel.add(circleButton);
            buttonPanel.add(radioButtonPanel);
            // attach button panel & draw panel to content panel
            Container container = getContentPane();
            container.setLayout(new BorderLayout(10,10));
            container.add(myPanel, BorderLayout.CENTER);
             container.add(buttonPanel, BorderLayout.EAST);
            container.add(sizeSlider, BorderLayout.SOUTH);
            setSize(500, 400);
             setVisible(true);
         public static void main(String args[]) {
             shapes application = new shapes();
             application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }second one is drawpanel:
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
        private int shapeSize = 100;
        private Color foreground;
         // draw a specified shape
        public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
            int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
                 if (fill == true){
                     g.setColor(foreground);
                      g.fillOval(x, y, shapeSize, shapeSize);
                else{
                       g.setColor(foreground);
                    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
                 if (fill == true){
                     g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
                else{
                        g.setColor(foreground);
                    g.drawRect(x, y, shapeSize, shapeSize);
        // set showStatus value
        public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
        public boolean getShowStatus () {
              return showStatus;
         // set fill value
        public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
        public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
        // set shapeSize value
        public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
        // set foreground value
        public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
        public void draw (){
              if(showStatus == true)
              repaint();
    }If any kind people who can help me.
    many thanks to you!

    4 widgets???
    maybe this is what you mean.
    add this inside your actionPerformed method for the reset action
    squareButton.setSelected(true);
    colorComboBox.setSelectedIndex(0);
    if not be more clear in your post.

  • Reset "international language" in system preferences?

    hi
    on one of my client macs is a really funny display of:
    http://www.usz.tu-darmstadt.de/images/Fotos/bildersportangebot/bild%202.jpg
    normally it should look like this:
    http://www.askdavetaylor.com/1-blog-pics/mac-system-preferences-international-in put-menu.png
    what can i do to repair this client? is there an ability to delete a com.apple.language.plist or something like that?
    thanks!
    mac monnem

    thats the point! that doenst all doesnt work!
    1. it should look like that: http://www.askdavetaylor.com/1-blog-pics/mac-system-preferences-international-in put-menu.png
    but it looks like that: http://www.usz.tu-darmstadt.de/images/Fotos/bildersportangebot/bild%202.jpg
    2. if i try to change in the input menu to choose only german or in the language menu ( http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/Artic les/art/intlprefpane.gif ) to change to germat, respectivly, it only works till the next restart.
    3. the panel in the input menu to choose character palette / japanese kana palette / keyboard viewer NEVER appears.
    thats why i asked for a way to reset the complete international prefane, that it looks like factory setting.

  • A problem with java program(reset problem in java GUY)

    I do not know how to make the button reset,my program only could reset diagram but button.If any one who could help me to solve this problem.The problem is When the reset button is pressed, the image should immediately revert to the black square, and the 4 widgets listed above should show values that
    correspond to the black square.
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
        private int shapeSize = 100;
        private Color foreground;
         // draw a specified shape
        public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
            int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
                 if (fill == true){
                     g.setColor(foreground);
                      g.fillOval(x, y, shapeSize, shapeSize);
                else{
                       g.setColor(foreground);
                    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
                 if (fill == true){
                     g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
                else{
                        g.setColor(foreground);
                    g.drawRect(x, y, shapeSize, shapeSize);
        // set showStatus value
        public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
        public boolean getShowStatus () {
              return showStatus;
         // set fill value
        public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
        public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
        // set shapeSize value
        public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
        // set foreground value
        public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
        public void draw (){
              if(showStatus == true)
              repaint();
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class shapes extends JFrame {
         private JPanel buttonPanel; // panel for buttons
         private DrawPanel myPanel;  // panel for shapes
         private JButton resetButton;
        private JComboBox colorComboBox;
         private JRadioButton circleButton, squareButton;
         private ButtonGroup radioGroup;
         private JCheckBox filledButton;
        private JSlider sizeSlider;
         private boolean isShow;
         private int shape;
         private boolean isFill=true;
        private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
                                   "green", "lightgray", "magenta", "orange",
                                   "pink", "red", "white", "yellow"};   // color names list in ComboBox
        private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public shapes() {
             super("Draw Shapes");
             // creat custom drawing panel
            myPanel = new DrawPanel(); // instantiate a DrawPanel object
            myPanel.setBackground(Color.white);
             // set up resetButton
            // register an event handler for resetButton's ActionEvent
            resetButton = new JButton ("reset");
             resetButton.addActionListener(
              // anonymous inner class to handle resetButton events
                 new ActionListener() {
                       // draw a black filled square shape after clicking resetButton
                     public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
                          // to decide if show the shape
                         myPanel.setShowStatus(true);
                             isShow = myPanel.getShowStatus();
                             shape = DrawPanel.SQUARE;
                         // call DrawPanel method setShape to indicate shape to draw
                             myPanel.setShape(shape);
                         // call DrawPanel method setFill to indicate to draw a filled shape
                             myPanel.setFill(true);
                         // call DrawPanel method draw
                             myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
             );// end call to addActionListener
            // set up colorComboBox
            // register event handlers for colorComboBox's ItemEvent
            colorComboBox = new JComboBox(colorNames);
            colorComboBox.setMaximumRowCount(5);
            colorComboBox.addItemListener(
                 // anonymous inner class to handle colorComboBox events
                 new ItemListener() {
                     // select shape's color
                     public void itemStateChanged(ItemEvent event) {
                         if(event.getStateChange() == ItemEvent.SELECTED)
                             // call DrawPanel method setForeground
                             // and pass an element value of colors array
                             myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
                        myPanel.draw();
                }// end anonymous inner class
            ); // end call to addItemListener
            // set up a pair of RadioButtons
            // register an event handler for RadioButtons' ItemEvent
             squareButton = new JRadioButton ("Square", true);
             circleButton = new JRadioButton ("Circle", false);
             radioGroup = new ButtonGroup();
             radioGroup.add(squareButton);
             radioGroup.add(circleButton);
            squareButton.addItemListener(
                // anonymous inner class to handle squareButton events
                new ItemListener() {
                       public void itemStateChanged (ItemEvent event) {
                           if (isShow==true) {
                                 shape = DrawPanel.SQUARE;
                                 myPanel.setShape(shape);
                                 myPanel.draw();
                   }// end anonymous inner class
             );// end call to addItemListener
             circleButton.addItemListener(
                   // anonymous inner class to handle circleButton events
                new ItemListener() {
                       public void itemStateChanged (ItemEvent event) {
                             if (isShow==true) {
                                 shape = DrawPanel.CIRCLE;
                                 myPanel.setShape(shape);
                                 myPanel.draw();
                             else
                                 System.out.println("Please click Reset button first");
                   }// end anonymous inner class
             );// end call to addItemListener
             // set up filledButton
            // register an event handler for filledButton's ItemEvent
            filledButton = new JCheckBox("Filled", true);
             filledButton.addItemListener(
              // anonymous inner class to handle filledButton events
            new ItemListener() {
                  public void itemStateChanged (ItemEvent event) {
                    if (isShow==true) {
                            if (event.getStateChange() == ItemEvent.SELECTED) {
                                  isFill=true;
                                  myPanel.setFill(isFill);
                                  myPanel.draw();
                            else {
                                isFill=false;
                                  myPanel.setFill(isFill);
                                  myPanel.draw();
                    else
                        System.out.println("Please click Reset button first");
              }// end anonymous inner class
             );// end call to addItemListener
            // set up sizeSlider
            // register an event handler for sizeSlider's ChangeEvent
            sizeSlider = new JSlider(SwingConstants.HORIZONTAL, 0, 300, 100);
            sizeSlider.setMajorTickSpacing(10);
            sizeSlider.setPaintTicks(true);
            sizeSlider.addChangeListener(
                 // anonymous inner class to handle sizeSlider events
                 new ChangeListener() {
                      public void stateChanged(ChangeEvent event) {
                          myPanel.setShapeSize(sizeSlider.getValue());
                             myPanel.draw();
                 }// end anonymous inner class
             );// end call to addChangeListener
            // set up panel containing buttons
             buttonPanel = new JPanel();
            buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
             buttonPanel.add(resetButton);
             buttonPanel.add(filledButton);
            buttonPanel.add(colorComboBox);
            JPanel radioButtonPanel = new JPanel();
            radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
            radioButtonPanel.add(squareButton);
            radioButtonPanel.add(circleButton);
            buttonPanel.add(radioButtonPanel);
            // attach button panel & draw panel to content panel
            Container container = getContentPane();
            container.setLayout(new BorderLayout(10,10));
            container.add(myPanel, BorderLayout.CENTER);
             container.add(buttonPanel, BorderLayout.EAST);
            container.add(sizeSlider, BorderLayout.SOUTH);
            setSize(500, 400);
             setVisible(true);
         public static void main(String args[]) {
             shapes application = new shapes();
             application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }Many thanks

    Who is this Java guy anyway?

  • Unresponsive keyboard/trackpad and intermittent Bluetooth on MacBook...possible internal USB problem?

    I have a mid-2010 polycarbonate/white MacBook (model A1342) running OS X 10.6.8. My machine has been having issues with the internal Bluetooth and keyboard/trackpad randomly ceasing to function.
    Bluetooth issue
    As of recently (the past month or two), the Bluetooth adapter will completely disappear and eventually reappear on a random basis. It won't appear at all in System Profiler, and the BT menu says "not available". Also, I have had a few kernel panics recently, all of which were apparently thrown by a Bluetooth process/daemon/driver (unfortunately I forgot which one, and also lost the logs from the panics.)
    My system has a Broadcom Bluetooth chip that's part of the AirPort card, but is basically just an internal USB device. The adapter has some sort of integrated USB hub ("BRCM2070 Hub"), which the "Bluetooth Module" device itself is connected to.
    Nonetheless, this seems to be some sort of problem on the USB bus. Whenever there is a failure, I will almost always see output in Console showing USB errors (ie errors about "enumerating a USB device", "clearing port power", "setting port power", "getting port status", etc). It will either be on any of the ports of the hub at 0x6600000 (the "BRCM2070 Hub" that "Bluetooth Module" is connected to), or port 6 of the hub at 0x6000000 (BRCM2070's port on the internal bus, which the keyboard/trackpad is also connected to on port 3).
    I can post more/longer ones, but here's a somewhat short example of the error messages I might receive:
    11/18/12 3:18:36 PM kernel USBF: 7351.492 [0xcf9b300] The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 6 of Hub at 0x6000000)
    11/18/12 3:18:38 PM kernel USBF: 7353.987 AppleUSBHubPort[0xcf9b300]::FatalError - Port 6 of Hub at 0x6000000 reported error 0xe00002c7 while doing clearing port power feature
    11/18/12 3:18:38 PM kernel USBF: 7353.987 [0xcf9b300] The IOUSBFamily was not able to enumerate a device.
    11/18/12 3:20:20 PM blued[448] Apple Bluetooth daemon started
    11/18/12 3:20:20 PM kernel USBF: 7456.186 [0x11fb1300] The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 2 of Hub at 0x6600000)
    11/18/12 3:20:20 PM kernel USBF: 7456.188 [0x11fb1300] The IOUSBFamily was not able to enumerate a device.
    Keyboard/trackpad issue
    There's also an issue where the internal keyboard/trackpad will randomly cease functioning (until I restart), often a couple of times a day as of recently. I've had this issue on rare occasion for a while now, but it's gotten more frequent. And more recently, the caps lock light on the keyboard occasionally turns itself on when I'm away.
    Both the internal keyboard/trackpad as well as the Bluetooth "hub"/device are connected to the same USB bus/hub. When the keyboard/trackpad die, I've noticed that there will be very similar messages in Console to those above and usually a Bluetooth failure at the same time. (In some cases, it seems to notice that the keyboard/trackpad isn't responding, then attempts to reset/reinitialize it...ie log below.) What could the root cause be...could it be the USB "root" hub/bus causing one or both of these to fail, or possibly a problematic device causing the other to lose connection? I haven't had issues with USB devices on other buses failing, though (ie no problems with external devices.)
    Maybe more out of curiosity than anything else, but I've been poking around for info on what might be going on with the USB (aside from the 0x66 hub repeatedly dropping/reconnecting and etc), but can't find much. There seems to be no documentation about the error codes (ie 0xe00002c7) that the hardware/OS are relaying. I even poked through the source for some of the relevant kexts and some reading on OS X driver/kernel programming too...might as well learn more about the inner workings of OS X
    Here's an example of some of the messages that I get about the Keyboard/Trackpad:
    11/21/12 2:57:22 AM kernel USBF: 1439.228 IOUSBHIDDriver(AppleUSBMultitouchDriver)[0xd1ff000]: Detected an kIONotResponding error but still connected. Resetting port
    11/21/12 2:57:22 AM kernel USBF: 1439.234 AppleUSBHubPort[0xd040600]::Resetting device Apple Internal Keyboard / Trackpad: port 3 of Hub at 0x6000000
    11/21/12 2:57:22 AM kernel USBF: 1439.319 [0x14452600] USB HID Interface #0 of device CompositeDevice @ 5 (0x6610000)
    11/21/12 2:57:22 AM kernel AppleUSBMultitouchDriver::message - kIOUSBMessagePortHasBeenReset.
    11/21/12 2:57:23 AM blued[248] Apple Bluetooth daemon started
    11/21/12 2:57:23 AM kernel AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized
    Attempted fixes
    Unfortunately, my Macbook isn't under warranty so I'm mostly on my own. First I zapped PRAM, reset SMC, ensured OS updates are installed (still on 10.6.8), and threw out a few drivers/software that were possible troublemakers. Next, I tried running another OS/install to rule out software issues. Accordingly, I found that the BT adapter sometimes disappears on Windows 7 as well (just did a clean install). And finally, I bought a new AirPort/BT card and installed it the other day. That seemed better at first, but I still have the problem of intermittent Bluetooth and keyboard/trackpad.
    Problems/solutions?
    What might the issue be, or is there anything that may be worth trying? As I mentioned, I've reset PRAM and SMC, made sure it's not an OS/driver issue (it happens on Win7 too), and replaced the Airport card. The machine does have aftermarket RAM (from OWC, ~2 years old) and SSD (Crucial M4, installed September)...but it seems unlikely that either of these would cause the problem. There haven't been any accidents that would have caused physical or (to my knowledge) electrical damage to it.
    I also searched for any occurrences of similar problems, but could not find any that were applicable to the Macbook revision in question. There was a similar keyboard/trackpad issue on older Macbook Pros that was caused by stress on a ribbon cable...but that seems unlikely given the concurrent issues with Bluetooth as well as the different design.
    The only thing I can think of next is to possibly replace the cable connecting the Airport card to the logic board, and possibly look at replacing the keyboard/trackpad (topcase). Anyway, I'm worried that it might be a hardware issue with the internal USB controller/hub, which would probably mean that it's unfixable unless I replace the logic board.
    Any advice as to which of these might be a potential solution or cause of the problem? Or might I just as well sell it off in its current condition and replace it?
    Thanks all!

    Has anyone find a fix for this?  I've been using my Dragon Dictate headset on my MacBook Pro for about a year, and then today, when I plugged it in, I got this:
    4/16/14 10:01:04.000 AM kernel[0]: USBF:    47.766    The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 1 of Hub at 0x4000000)
    4/16/14 10:01:07.000 AM kernel[0]: USBF:    50.269    AppleUSBHubPort::FatalError - Port 1 of Hub at 0x4000000 reported error 0xe00002c7 while doing clearing port power feature
    4/16/14 10:01:07.000 AM kernel[0]: USBF:    50.269    The IOUSBFamily was not able to enumerate a device.
    Here is what I have tried so far:
    Reset the PRAM
    Reset SMC
    Verify disk (there were no problems)
    Repair permissions
    Boot with an external USB hard drive (which works fine on the "problem" computer) that contained an old SuperDuper clone of my hard drive from several months ago. I received the same "The IOUSBFamily was not able to enumerate a device" error when I plug in the headset.
    Tried to headset on another computer, and it worked fine.
    Plug in an external USB keyboard into the problem computer, and it works fine.
    All of this would lead me to conclude that it is a hardware problem. But it seems that if it were a hardware problem, the external USB keyboard and external USB hard drive would not work (which they do). If the problem were with the headset, it wouldn't work on another computer, but it does.  So I'm wondering if it's some sort of firmware issue…???????  URG!!!!!!

  • Declaring an internal table in smartform

    hi,
       can anyone tell how to declare   internal table in smartform.
       the internal table contains fields from 2 or more data dictionary tables(eg.kna1 
       and adrc). after this from the print program(internal table containing data in print
       program) internal table should be passed to the smartform.
    thanks.

    hi laxya,
    if u want to pass the data from internal table in print program to Smartform.. there is only way.. that is using form interface..
    1. goto se11, create a structure same as the itab in the print program.ex. <b>z_itab</b>
    2. create line type... se11>select radio button-DATA type><b>z_it_itab</b> >press create>then select>TABLE Type> then entrer some text--> in the line type Field in giveth Str name u have created in STEP 1. activate it.
    3. got SMARTFORMS-> form inteface>tables tabe--> give some name ex <b>IT_tab type z_it_itab</b>.
    then acivate it.. then in the driver progam pass this table data.
    Exapmpel
    CALL FUNCTION fp_v_fm_name
        EXPORTING
          archive_index      = toa_dara
          archive_parameters = arc_params
          control_parameters = fp_st_control_parameters
          user_settings      = space
          output_options     = fp_st_output_options
          wa_vbdkr           = fp_st_vbdkr
        IMPORTING
          job_output_info    = l_it_ssfcrescl
          job_output_options = l_it_ssfcresop
        TABLES
    <b>      IT_tab  = z_it_itab (or table in driver program)</b>
      EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Another way is cteate a type in Globaldifination-->types tab..
    ex:
    types: begin of ty_itab,
       matnr type matnr,
       meins type meins
       vrkme  type vrkme,
    end of ty_itab,
    ty_it_itab type standard table of ty_itab.
    then GLOBAL DIFINATION>GLOBAL DATA TAB>IT)ITAB TYPE TY_IT_ITAB.
    BUT In this u can't pass the data from the print Program.. if u want to populate data in to this table... u have to write the Select query in the GLOBAL DIFINATIONS-->INITILIZATIONS TAB.
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K
    Message was edited by:
            Naresh Reddy

  • Creating MS- Access data base from the Internal tables data of an ABAP Prog

    Hi,
    I have a requirement where I have to create Access tables from the Internal tables of ABAP program.
    The tables are like Project systems Header data, WBS elements data, Netwrok data, Activity data, Milestone data and Project revunes. I will have the internal tables for these. I want to transfer these tables data into MS-Access tables onto Users desktop.
    Please adivce me how to do this.
    Thanks,
    Prabhakar

    HI,
    I am trying to create a DB table in the access but I am not successful. The following is the format of the table needs to be created from the ABAP program.
    I have created a table with the following format in MS-Access with the name tblHeader. Is it neccessary to create a DB table ( MS-Access) in advance or by using the FM  STRUCTURE_EXPORT_ TO_MSACCESS  we need to create a structure in MS-Access?
    False tblHeader
    Field Name Type Length
    ProjectDef Text 255
    ProjectDes Text 255
    Created Text 50
    Change Text 50
    RespPerson Text 255
    Profile Text 255
    Plant Text 255
    ObjNo Text 255
    OverheadKey Text 255
    I have created a Z table ZTAB1 with the same format from the SAP fields.
    MS-Access Table name : tblHeader
    ABAP program Internal table : t_tblheader
    Z table Name : ZTAB1.
    First I am trying to create a structure in MS-Access with the following FM.
    CALL FUNCTION 'STRUCTURE_EXPORT_ TO_MSACCESS'
    EXPORTING
    dbname = 'D:\test\db2'
    LANGU = SY-LANGU
    dest = 'PS_ACCESS_1'
    TABLES
    tabname = ttblheader
    EXCEPTIONS
    system_failure = 1
    comm_failure = 2
    OTHERS = 3
    Table ttblheader type is DFIES and I am filling the table with only one record and one field i.e TABNAME and the value is ZTAB1.
    The source code of the FM is using another FM
    CALL FUNCTION 'MSACCESS_STRUCT_ EXPORT_RFC' DESTINATION DEST
    Here I am getting the Error message Object required. I can't able to create a table structure in MS-Access.
    Next I am going to Use the FM
    'TABLE_EXPORT_ TO_MSACCESS'
    and it will create the records in the MS-access table.
    CALL FUNCTION 'TABLE_EXPORT_ TO_MSACCESS'
    EXPORTING
    dbname = 'D:\test\db2'
    langu = sy-langu
    dest = 'PS_ACCESS_2'
    tabname = 'ZTAB1'
    reftable = 'tblheader'
    FLG_NO_DOWNLOAD = ' '
    FLG_APPEND = ' '
    FLG_POPUP = ' '
    TABLES
    dtab = t_tblheader
    here t_tblheader is the internal table.
    Reftable = tblheader is the table which i have created in advance. ( not by using the First FM)
    In this FM i am getting a error message : Unable to connect to Database D:\test\db2.
    Please help me how to create the MS-Access database.

  • HR-ABAP Programming

    Hi All,
       How far are LDB's relevant to HR-ABAP Programming, are <u><i><b>select</b></i></u> statements absoultely obselete in HR-ABAP Programming. Here in our project we are only using select statements to retrieve date from infotypes. Is it a wrong programming practice? Is it absoultely necessay that we should only use LDB'S in HR-ABAP programming.
           Basically got this doubt because whatever the SAP Documentation related to HR-ABAP Programming i found uses only LDB'S to retrive data. Please clarify my doubt.

    Hi vijay,
    1. are select statements absoultely obselete in HR-ABAP Programming
    Absolutely No.
    (I have never read such thing)
    (Further, all sap programs,
    whether ldb or normal programs,
    internally do use Select statements,
    to fetch data)
    2. Is it a wrong programming practice?
    Absolutely No.
    (If we know the hr tables
    and if we know the correct select statement,
    then there is no harm in using them)
    3.
    Is it absoultely necessay that we should only use LDB'S in HR-ABAP programming.
    Its optional to use (not necessary)
    I personally never use ldbs,
    bcos
    a) their selection screen is insufficient
    b) their selection screen has extra fields
       which are not required, and some times
       not relevant for the requirement)
    c) before using GET, i need to know
       many things for showing to the user,
       so for this, i explicitly have to write
       my own code (ie.select statment)
    regards,
    amit m.

Maybe you are looking for

  • How do you know your wireless is secure?

    I want to know how you know your internet is secure so no one in your neighbor hood can steal or hack my internet service. A few people in our house use a mix between ethernet cable and wireless. I don't use the wireless so i don't know how you set i

  • Ipad 2 vpn not working?

    I'm trying to turn on VPN but always disconnected by communication device.

  • How to Pass Multiple data records into SDATA for a segment

    Hi Friends, I need to Pass data records to Function Module MASTER_IDOC_DISTRIBUTE for Creating Outbound IDOCs I am Collecting all the Data Records and Passing into the Structure EDIDC. Here my problem is For one Route there are Multiple Customer reco

  • Boot Camp:  Vista side won't start up

    When I click on vista on the boot camp menu, it loads and all, but it goes to the black error screen that says like "start normally" or "start with command prompt" or "start in safe mode" etc etc, and no matter what I click on, it just won't load and

  • Path to download kernel path 95

    Please let me know the path to download kernel path 95