Use of dispose() and finalize()

Hello everyone (first post ever). I have a question about a program that I'm currently working on that doesn't seem to be releasing system resources. Here's a brief description of my program and my problem:
Program Description: It's a widget that queries a news file every couple of minutes to check if the file was updated. If it was updated, then the taskbar icon flashes and signals the user to click on it to open a window showing them the news.
Problem: The main use of this program will be just sitting in the taskbar waiting and checking to see if there are any updates. However, after a user opens the window, the memory usage obviously spikes to show the content of the window. After the window is closed, the memory stays allocated and never seems to go back down to it's memory usage when it was just sitting in the taskbar. I have the window set to dispose on close and have fiddled around with adding finalize() and dispose() statements in a couple of different places. I also don't call anything from this class in any of my other classes.
Here is my Window.class, where I'm hoping the problem is. Thanks.
package mainFiles;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
// The part of the program that displays the main window of the widget
public class Window extends JFrame implements ActionListener, WindowListener {
     private static final long serialVersionUID = 1L;
     // Declare the global variables used in the method
     private JButton updateButton;
     // The default constructor of the window
     public Window() {
          // Create the container for holding the content of the widget
          JFrame mainWindow = new JFrame();
          mainWindow.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
          this.centerWindow(mainWindow, 475, 350);
          mainWindow.addWindowListener(this);
          // Customize the look of the JFrame a little bit
          mainWindow.setIconImage(new ImageIcon("system/images/tray_inactive.gif").getImage());
          mainWindow.setTitle("Widget Text");
          mainWindow.setResizable(false);
          // Create the home panel of the widget
          WindowBackground homePanel = new WindowBackground();
          mainWindow.setContentPane(homePanel);
          homePanel.setLayout(new BoxLayout(homePanel, BoxLayout.X_AXIS));
          // Create the left side of the window
          JPanel leftPanel = new JPanel();
          leftPanel.setOpaque(false);
          leftPanel.setPreferredSize(new Dimension(104,324));
          homePanel.add(leftPanel);
          // Add a spacer to the left panel from the top
          leftPanel.add(Box.createRigidArea(new Dimension(104,16)));
          // Add the update button to the left side of the widget
          updateButton = new JButton("Refresh");
          updateButton.addActionListener(this);
          leftPanel.add(updateButton);
          // Create the right side of the window
          JPanel rightPanel = new JPanel();
          rightPanel.setOpaque(false);
          rightPanel.setPreferredSize(new Dimension(365,324));
          homePanel.add(rightPanel);
          // Add a spacer to the right panel from the top
          rightPanel.add(Box.createRigidArea(new Dimension(365,16)));
          // Create the scrollpane which allows the news to be scrolled up and down
          JScrollPane contentScrollPane = new JScrollPane(Content.mainPanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                    JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          contentScrollPane.getViewport().setOpaque(false);
          contentScrollPane.setOpaque(false);
          contentScrollPane.setEnabled(true);
          // Set the size of the scrollpane, then add it to the right panel
          contentScrollPane.setPreferredSize(new Dimension(356,290));
          rightPanel.add(contentScrollPane);
          // Create an empty border around the scrollpane to remove the border
          Border empty = new EmptyBorder(0,0,0,0);
          contentScrollPane.setBorder(empty);
          contentScrollPane.setViewportBorder(empty);
          // Whenever the window is opened, update the tray icon to inactive
          Widget.updateIconToInactive();
          // Show the window to the user
          mainWindow.setVisible(true);
     // If the main window of the widget is closed, then give the user the ability to make a new one
     public void windowClosing(WindowEvent event) {
          // Set the window to no longer being active
          Widget.windowActive = false;
          // *** This doesn't seem to work
          this.removeAll();
          System.gc();
     // For centering the window on the user's desktop
     public void centerWindow(JFrame window, int width, int height) {
          // Set the size of the window to the size wanted
          window.setSize(width, height);
          // Get the two sizes and compute the average size between them
          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
          Dimension windowSize = window.getSize();
          int x = (screenSize.width / 2) - (windowSize.width / 2);
          int y = (screenSize.height / 2) - (windowSize.height / 2);
          // Set the location to the center of the screen
          window.setLocation(x, y);
     // Whenever a new WindowBackground is created, paint the background image on it
     public class WindowBackground extends JPanel {
          private static final long serialVersionUID = 1L;
          // Paint the background on the panel
          public void paintComponent(Graphics g) {
               ImageIcon background = new ImageIcon("system/images/bg_window.gif");
               background.paintIcon(this, g, 0, 0);
     // For responding to actions performed in the interface
     public void actionPerformed(ActionEvent event) {
          // If the user pushes the manual update button, then check for new updates
          if (event.getSource() == updateButton)
               Content.check();
     // Although these aren't used, they must be included in the class
     public void windowActivated(WindowEvent arg0) {}
     public void windowClosed(WindowEvent arg0) {}
     public void windowDeactivated(WindowEvent arg0) {}
     public void windowDeiconified(WindowEvent arg0) {}
     public void windowIconified(WindowEvent arg0) {}
     public void windowOpened(WindowEvent arg0) {}
}

I'll try to describe it in some more detail:
When the program first starts up, memory usage is around 9K to 11K, since the only task it has is to check an external file every five minutes to see if it's been updated. If there is an update, then the icon blinks which alerts the user that there is an update available. When they click on the icon, a window pops up displaying the news. Memory usage at this points run up to about 25K. Now this is where the problem comes in. After the window is closed, it should be disposed. Now, from what I understand, that means that the Garbage Collector should destroy it at some point and release the memory that's being used. However, many hours after the window has been closed, the memory usage is still at 25K. I just don't understand why it isn't using 9K-11K at that point.
The main reason I care so much about memory usage is because this is a program that is going to be running in the background while users play PC games. It's mainly to get in touch with each other and tell each other when an event is happening in a specific game.

Similar Messages

  • To remove all personal information from an iPhone I am about to dispose of, is it sufficient to use the "erase and reset" command in Settings, or should I do something more?

    I am about to replace an iPhone 4.  I want to make sure that it contains no recoverable personal information, such a contacts, photos, e-mail, etc.  If I use the erase and reset function in Settings will that be sufficient?  Or is there a way to write over the old information in a manner similar to a "secure empty trash?"

    Try What to do before selling or giving away your iPhone, iPad, or iPod touch

  • TREX Installation, Error in phase - Install TREX web resources and finalize

    Hello,
    Platforms:
    SO - Win 2008 (R2) X64
    During the last phase "Install TREX web resources and finalize instance" in installation process of TREX 7.1, it show me a weird error...
    It seems that was some problem during the creation of sap start service of this new instance... but that is weird because I checked at services.msc and that service SAPTSM_02 and nothing seems wrong with it, it seems that was well created and it is in Started mode!... I checked firewall settings (all of them are in OFF status), I also checked CUA settings (is stopped)...
    I searched for this error and I found the following SDN forum:
    SAPNW EHP1 SR1
    I already press the retry button but it always show me the same error.
    During this phase the SAPInst window show some information and in there I see this two:
    creating sap start service of instance TSM/TRX02...
    service not correcttly installed.
    It is very weird thing!
    I will post some log files such as sapstartsrv.exe and sapinst.log.
    sapstartsrv.exe:
    Test call to Service failed: 80080005
    CO_E_SERVER_EXEC_FAILURE: Server execution failed
    Service not correctly installed
    sapinst.log:
    INFO 2012-01-20 16:29:24.446
    Creating file C:Program Filessapinst_instdirNW702STANDALONETREXCIsapstartsrv.exe.log.
    INFO 2012-01-20 16:29:24.457
    Output of F:usrsapTSMTRX02exesapstartsrv.exe -stdin is written to the logfile sapstartsrv.exe.log.
    WARNING 2012-01-20 16:31:41.182
    Execution of the command "F:usrsapTSMTRX02exesapstartsrv.exe -stdin" finished with return code -1. Output:
    Test call to Service failed: 80080005
    CO_E_SERVER_EXEC_FAILURE: Server execution failed
    Service not correctly installed.
    ERROR 2012-01-20 16:31:41.380
    MOS-01011  'F:/usr/sap/TSM/TRX02/exe/sapstartsrv.exe' returned with '-1'.
    ERROR 2012-01-20 16:31:41.381
    MOS-01011  'F:/usr/sap/TSM/TRX02/exe/sapstartsrv.exe' returned with '-1'.
    ERROR 2012-01-20 16:31:41.470
    FCO-00011  The step createService with step key |TREX_NW_CI_MAIN|ind|ind|TREX|ind|0|0|TREX_MAIN|ind|ind|TREX|ind|0|0|createService was executed with status ERROR ( Last error reported by the step :'F:/usr/sap/TSM/TRX02/exe/sapstartsrv.exe' returned with '-1'.).
    Can you help me please, how can I solve this?
    Kind regards,
    JDimas

    Hello Arjun Venkateswarlu,
    1).Is your Windows Firwall is enabled ? Disable the windows Firewall and also restart SAPinst
    - As I said the windows firewall is disable (OFF)
    2). Make sure that <sid>adm belongs to the local admins or Better provide the domain admin rights to the id which you are using for installation if it is domain installation.
    - All the created users during this installation belongs to local admins. This isn´t a domain installation!
    3). Try Restarting the installation by stopping and starting Windows and restart SAPINST and coninue Old Installation again.
    - I already did that... but it continues to show me the same error!
    Any other tip?
    Kind regards,
    JDimas

  • Using photo shop and muse together. mock up to final design

    Hi as .you know from me asking a million questions. i just heard that photo shop can be used as a mock up for web design.  from this video i saw.  i am wondering should this be the work flow that i should be using instead of just jumping into muse like i did before in Dreamweaver.? if thats the case i am willing to change my habit.  i keep hearing that all ideas come from a sketch layout. with the new photo shop sketch tool for ipad.  i am wondering if thats going to be the core for web site ideas.  then finish it in photo shop and finalize it in muse . again design is my weak point thats why i have my degree in commercial graphics/ photography. thats why i enjoy web design. but want to keep it simple.  so would you recommend this idea?
    Placing a PSD in Adobe Muse - Muse-Themes.com - YouTube

    Integration between Muse and Photoshop is limited to placing PSD files into Muse as images or as rollover buttons at the moment. So if you are looking at a workflow that web designers use with Photoshop > Dreamweaver after slicing, then that is not possible in Muse right now.
    Photoshop and Dreamweaver integration on the other hand has been drastically improved with introduction of the Extract service and panel in Dreamweaver. You can read more about that here: Extract a Photoshop design into code in Dreamweaver | Adobe Dreamweaver CC tutorials
    Cheers,
    Vikas

  • After Effects: Taking 9 hours to render and finalize a 4 minute song with audio spectrum?

    Hello, I am using Adobe After Effects to create some Youtube videos for my music. I have a 4 minute song I've created, and have added 6 layers of audio spectrum, as well as glows, and a few other minor effects. I'm newer to the program, but I still do not understand how the estimated time to render 6,125 frames is 9 HOURS?
    My computer: Dell Optiplex 760
    Intel(R) Core 2 Duo CPU - E7200 @ 2.53GHz
    Ram: 8 GB
    System: 64-bit
    Hard Drive: 250GB
    The Rendering process is set on multi-process rendering. It is using 71% of 8GB ram constantly.
    I am rendering my 4 minute song, along with the 6 layers of audio spectrum, glows, and other effects, along with 2 small text layers.
    This is going into MPEG4 format, with "Best Settings".
    I have tried .FLV, .MPEG4, .H261, and .MOV and they all have the same estimated time for 6,125 frames.
    Could anyone provide me any advice? I need to render and finalize this composition, then upload it to youtube. So it would be great to have decent quality, as well as GOOD sound quality.
    Thank you!

    Don't use compressed audio -- change ac3's, aac's or mp3's to wav or aiff.
    Turn off the multiprocessing--it probably isn't helping one bit, and you may have it set up wrong, too.
    Render to a quicktime movie in Animation, Photo JPEG  or PNG codecs.  Compress later
    Just before bedtime, hit the Render button, have a nice night's sleep, and see how things are doing in the morning.
    Compress to mp4 using Adobe Media Encoder.
    And FYI:  things that you call "minor effects" may in reality be quite processor-intensive, meaning AE has to work harder, meaning it'll take a good deal of rendering time.
    AE isn't a video editor.  It's an effects, motion graphics  and compositing application.  It doesn't work like a video editor.  You can't expect it to react or perform like a video editor.

  • Difference between dispose and setVisible(false)?

    What is the difference between dispose() and setVisible(false)? The only difference I see is that setVisible(false) and bring a window back by using a true flag, while dispose() cannot. Other than that, they appear to do the same thing.
    If I want to get rid of a window (with no intention of bring it back), which should I use?
    Also, is there a memory advantage to using one or the other?
    Thanks for any responses.

    setVisible just makes it visible or not...the advantage would be that you would not have to constantly spend time creating a new object, downside is it sits in memory until you really need it again.
    dispose will actually tell the gc it's ok to clean up the object...and you would have to make a new one each time you wanted to use it...advantage, frees up ram, disadvantage, takes time to create objects over and over.

  • Info path form gives error on submitting "The StateManager is disposing and calling ReleaseLockedStates() (Count=0)"

    Hi,
       I have created a very simple form which has 2 data connections all together. One connection is for a drop down which gets populated from a list within that site itself and the other data connection is used when I am submitting that form. But
    it is giving this error when I am submitting the form
    Error:
    The StateManager is disposing and calling ReleaseLockedStates() (Count=0)
    So, I have created a data connection library and uploaded the 2 udcx file in it and approved them but still the error is there.
    Please assist me on this. It is very urgent.

    Resolved the issue by changing the button type to "Submit"

  • Hang when using UIManager.getSystemLookAndFeelClassName() and JFileChooser

    i encountered this wierd problem when i used UIManager.getSystemLookAndFeelClassName() and JFileChooser on a machine with win2002 (no service pack installed) and on another machine with winxp (no service pack installed). the code works perfectly fine with other pc but apparently our client did something to make it hang whenever either of these were called. i was just wondering how this can happen since its no longer a code problem but rather betwen java and windows. our program runs on java 1.4.x.
    for more info about this problem here's a simple test program that doesnt work on the said machines:
    === code start ===
    import java.io.File;
    import javax.swing.JFileChooser;
    import javax.swing.UIManager;
    public class Test {
    public static void main(String[] args) throws Exception {
    // this portion works fine. this is to prove that there is no problem with IO on java
    File file = new File(".");
    String files[] = file.list();
    System.out.println(file.getAbsolutePath());
    for(int i=0;i<files.length;i++)
    System.out.println(files);
    // program hangs on this part. see thread dump of JFileChooser below
    System.out.println("init JFileChooser");
    JFileChooser fileChooser = new JFileChooser ();
    // when code above is commented out, program also hangs on this part. see thread dump of UIManager below
    System.out.println("init UILookAndFeel");
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    System.out.println("done");
    === code end ===
    thread dump of JFileChooser:
    === thead dump start ===
    Full thread dump Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode):
    "AWT-Windows" daemon prio=7 tid=0x02e2ebb8 nid=0x93c runnable [70bf000..70bfd8c]
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:262)
    at java.lang.Thread.run(Thread.java:534)
    "Signal Dispatcher" daemon prio=10 tid=0x009c8da8 nid=0xa74 waiting on condition [0..0]
    "Finalizer" daemon prio=9 tid=0x00990a10 nid=0x860 in Object.wait() [2b4f000..2b4fd8c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x105103a8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
    - locked <0x105103a8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x0098f5e0 nid=0xa6c in Object.wait() [2b0f000..2b0fd8c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x10510410> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:429)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
    - locked <0x10510410> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x00034a88 nid=0xa64 runnable [7e000..7fc3c]
    at sun.awt.font.NativeFontWrapper.registerFonts(Native Method)
    - locked <0x14199820> (a java.lang.Class)
    at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:797)
    at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:643)
    at sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:53)
    at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:262)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:256)
    - locked <0x10510430> (a sun.awt.Win32GraphicsEnvironment)
    at sun.java2d.SunGraphicsEnvironment.mapFontName(SunGraphicsEnvironment.java:504)
    at java.awt.Font.initializeFont(Font.java:312)
    at java.awt.Font.<init>(Font.java:344)
    at sun.awt.windows.WDesktopProperties.setFontProperty(WDesktopProperties.java:157)
    - locked <0x105367f8> (a sun.awt.windows.WDesktopProperties)
    at sun.awt.windows.WDesktopProperties.getWindowsParameters(Native Method)
    at sun.awt.windows.WDesktopProperties.<init>(WDesktopProperties.java:56)
    at sun.awt.windows.WToolkit.initializeDesktopProperties(WToolkit.java:876)
    at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1569)
    - locked <0x105367c0> (a sun.awt.windows.WToolkit)
    at sun.awt.shell.ShellFolder.<clinit>(ShellFolder.java:208)
    at javax.swing.filechooser.FileSystemView.getRoots(FileSystemView.java:335)
    at javax.swing.filechooser.WindowsFileSystemView.getHomeDirectory(FileSystemView.java:649)
    at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFileChooserUI.java:214)
    at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:130)
    at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:152)
    at javax.swing.JComponent.setUI(JComponent.java:449)
    at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
    at javax.swing.JFileChooser.setup(JFileChooser.java:345)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
    at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
    at Test.main(Test.java:26)
    "VM Thread" prio=5 tid=0x009c76e8 nid=0xa68 runnable
    "VM Periodic Task Thread" prio=10 tid=0x009cb5c8 nid=0x9d0 waiting on condition
    "Suspend Checker Thread" prio=10 tid=0x009c8460 nid=0xa70 runnable
    === thead dump ends ===
    thread dump of UIManager:
    === thead dump start ===
    Full thread dump Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode):
    "AWT-Windows" daemon prio=7 tid=0x02e29d88 nid=0x960 runnable [725f000..725fd8c]
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:262)
    at java.lang.Thread.run(Thread.java:534)
    "Signal Dispatcher" daemon prio=10 tid=0x009c8da8 nid=0x2a8 waiting on condition [0..0]
    "Finalizer" daemon prio=9 tid=0x00990a10 nid=0x784 in Object.wait() [2b4f000..2b4fd8c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1050f430> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
    - locked <0x1050f430> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x0098f5e0 nid=0x350 in Object.wait() [2b0f000..2b0fd8c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x1050f498> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:429)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
    - locked <0x1050f498> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x00034a88 nid=0x934 runnable [7e000..7fc3c]
    at sun.awt.font.NativeFontWrapper.registerFonts(Native Method)
    - locked <0x141ed340> (a java.lang.Class)
    at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:797)
    at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:643)
    at sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:53)
    at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:262)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:256)
    - locked <0x1050f4a0> (a sun.awt.Win32GraphicsEnvironment)
    at sun.java2d.SunGraphicsEnvironment.mapFontName(SunGraphicsEnvironment.java:504)
    at java.awt.Font.initializeFont(Font.java:312)
    at java.awt.Font.<init>(Font.java:344)
    at sun.awt.windows.WDesktopProperties.setFontProperty(WDesktopProperties.java:157)
    - locked <0x10534da8> (a sun.awt.windows.WDesktopProperties)
    at sun.awt.windows.WDesktopProperties.getWindowsParameters(Native Method)
    at sun.awt.windows.WDesktopProperties.<init>(WDesktopProperties.java:56)
    at sun.awt.windows.WToolkit.initializeDesktopProperties(WToolkit.java:876)
    at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1569)
    - locked <0x1050f268> (a sun.awt.windows.WToolkit)
    at com.sun.java.swing.plaf.windows.XPStyle.getXP(XPStyle.java:75)
    - locked <0x1427fd50> (a java.lang.Class)
    at com.sun.java.swing.plaf.windows.WindowsTreeUI$ExpandedIcon.<init>(WindowsTreeUI.java:123)
    at com.sun.java.swing.plaf.windows.WindowsTreeUI$ExpandedIcon.createExpandedIcon(WindowsTreeUI.java:127)
    at com.sun.java.swing.plaf.windows.WindowsLookAndFeel.initComponentDefaults(WindowsLookAndFeel.java:309)
    at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:81)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:394)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:424)
    at Test.main(Test.java:23)
    "VM Thread" prio=5 tid=0x009c76e8 nid=0x92c runnable
    "VM Periodic Task Thread" prio=10 tid=0x009cb5c8 nid=0x944 waiting on condition
    "Suspend Checker Thread" prio=10 tid=0x009c8460 nid=0x940 runnable
    === thead dump ends ===
    hope someone can clarify me with this wierd anomaly.
    thanks.
    - ian
    [email protected]

    Try to move the following line of ur code to the first statement in main()
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    public static void main(String[] args) throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    }

  • How we will use these Job_open and Job_submit job_close??

    Hi Experts,
    i am new in Developement, i need one help here my problem is
    I have one issue which is a report here i am getting the data into internal table, that data fetching i want to schedule it in background job..
    can any body tell me how can i use the JOB_OPEN and JOB_SUBMIT function modules....
    plz provide any example..
    Thanks in Advance,
    Venkat N

    Hi,
    Here is the sample program
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • I'm using matchbook pro and I'm unable to find iPhoto after upgrading to Maverick os

    I'm using matchbook pro and I'm unable to find iPhoto after upgrading to Maverick os

    Open the Mac App Store application and see if iPhoto is under your "Purchases" tab.
    Clinton

  • Help using multiple iphones and ipods on itunes

    Okay, is there any simple way to use multiple apple products thru itunes. I can log in on my account and sync my iphone/ipod, then I log out and log back in with my daughter's account info. I plug her itouch in and it wants to read all of my apps(some apps we both have on our devices). Have problems with music sharing as well. Still a PC user. Get very frustrated with itunes. spend way too much time trying to do things that should be simple. please help! Thank you!

    Are you using method 1 with different windows user accounts?
    http://support.apple.com/kb/HT1495
    Sounds like you are currently using method 2 and not happy with it.

  • I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    Welcome to the Apple Community.
    It's do-able, but I don't think it's a great idea.
    DVI
    Some users with DVI have managed to get their TV's to work with DVI-HDMI cables. DVI carries no audio, so alternative connections need to be explored to enable audio. DVI doesn't necessarily support HDCP as well as other standards used by HDMI (which may or may not be an issue)
    Analogue
    There are hardware converters that will convert HDMI to various other types of output, however there are some issues with doing so that you should be aware of.
    HDCP
    HDCP compliant converters will not allow you to watch HDCP protected content such as that from the iTunes Store. Non compliant converters exist but we cannot discuss them under the Terms of Use for these communities.
    Resolution and aspect ratio
    I'm not aware of any converters that will scale the output from the Apple TV, any TV or projector which is used will need to be widescreen and support resolutions of 720p (Apple TV 2), 720p/1080p (Apple TV 3)
    DAC
    DAC (Example Only - Not a recommendation or suggestion that this is suitable in your circumstances)

  • IPad2 and a new MacBook running Lion, Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my Hotmail Id for my Apple Id and use it for iTunes, iCloud

    I have an iPad2 and a new MacBook running Mountain Lion. Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my current Hotmail Id for my Apple Id for iTunes, iCloud.
    Note, I will use both Hotmail and iCloud eMail.

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    no.

  • I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. suggestions to complete backup please?

    I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. the same thing happens when just trying to save my pictures from iphoto to a flash drive. suggestions to complete backup please?

    Sounds like you'll need to access that drive while it is not booted. You need to replace it anyway, so do that, then one way or another (ext enclusure, et), access it and copy files.
    If you keep trying to boot it, you might kill it for good and not get your files, so just swap it out first.

Maybe you are looking for

  • Display of secondary cost elements in KSB1

    Hi One of our customers wants to delete the view of Secondary Costs to a particular cost center in Actual View of Cost Line Items (through T Code KSB1). The costs flow to the secondary cost elements based on the activity type carried out. The system

  • Adding text to a  photo book

    I am trying to add a caption to my photos in a book I am creating in iphoto The format I am using allows this However - As I type my caption the text is appearing too small to even read I am unable to change the size of the font Even a 1 word comment

  • No links is available from CQ 5 welcome page

    From the CQ welcome page ("http://localhost:4502/libs/cq/core/content/welcome.html") none of the links are accessible. For example if  I click on "Digital Assets" link it will be redirected back to the welcome page. I have tried direct link of site a

  • Document date printing on checks

    Is there a system variable that will allow a check to print the relevant document date on checks?  Right now we have a database field setup that pulls relative to the docnum from the OPCH table.  So we are getting the correct document date on the che

  • How to disable a Column for a particular row in Advanced Tables

    Hi All, We are using an Advanced Table for search criteria. Our requirement demands to disable a column (we are using messagechoice item in that column) for only first row. We use standard Add Another Row functionality to add the rows.For the remaini