Windows Application Starting Point

Does a basic (and best practice) framework (or netbeans like project) exist for a java windows application that would include menuing and initial windows classes?
I have decided to create a application in java and it will be a windows gui application. I understand how to do this but it seems like this would be something someone else has already done. Kind of a starting point for an application. Does something like this exists? I searched online but didn't find anything. Maybe this is because I'm not sure what I'm asking for.

I haven't seen any nice GUI frameworks for Java, beyond what Java already gives you. It would depend somewhat on what the app does. And you have to decide if you want to use Swing or SWT. Based on a previous thread, it would seem there are also some GUI builder tools out there, if you don't want to hand code it, but they won't produce very nice code; they just help prevent you from having to write it yourself. If this is your first jump into Java GUI, here is a quick Hello World app I just threw together in using Swing; it's a starting point anyway, and might help you get going:
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class HelloWorld {
     public static void main(String[] args) {
          // Code that affects the GUI should be run on the Event Dispatch thread;
          // Calling launchUI() using SwingUtilities.invokeLater(...) takes care of this.
          SwingUtilities.invokeLater(new Runnable() {
               public void run() {
                    launchUI();
     private static void launchUI() {
          final JFrame frame = new JFrame("Hello World");
          JPanel panel = new JPanel(new FlowLayout());
          JLabel label = new JLabel("Hello World!");
          panel.add(label);
          panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
          JMenuBar menuBar = new JMenuBar();
          JMenu menu = new JMenu("File");
          JMenuItem menuItem = new JMenuItem("Exit");
          menuItem.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent event) {
                    // This action will be fired when the Exit menu item is selected;
                    // firing off a Window Closing event is basically the same thing
                    // pressing the window close button in the corner does.
                    WindowEvent windowClosingEvent = new WindowEvent(frame, WindowEvent.WINDOW_CLOSING);
                    frame.getToolkit().getSystemEventQueue().postEvent(windowClosingEvent);
          menu.add(menuItem);
          menuBar.add(menu);
          frame.setJMenuBar(menuBar);
          frame.setContentPane(panel);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setLocationRelativeTo(null);     // this centers the frame
          frame.setVisible(true);
}

Similar Messages

  • G3 Pismo hangs at "Login Window Application Started"

    Hello all,
    I have been trying unsuccessfully to bring my Pismo back to life following replacing the (dead) PRAM battery. I took it to the Apple Genius Bar today. They were able to use their diagnostic goodies to see the hard drive, could not fix the problem, so re-installed Tiger....and it still will not boot.
    When booted without anything more, it starts up fine, gets to the apple and spinning progress wheel, then goes to a blank blue screen and the hard drive stops.
    When booted in Verbose mode, it hangs after printing 'Login Window Application Started' to the screen.
    Of course this can't be the OS because it just got a clean re-install at the Apple store. Help?.....

    It is the original HD that came with the machine (I bought it used from somebody who had taken very good care of it).
    I am not saying that the HDD is the source of your issue, but you may want to consider it to be part of the issue. It doesn't matter how well it was cared for, as HDDs age their functionality decreases. The thin layer of lubricant on the platter thickens and becomes gummy with age and the interior heat of the computer. This spins out to the edges and causes the heads to stick, slowing up the drive. The hydroseal bearings almost literally float in lubricant, which also thickens with age and heat. The average life of an internal HDD is three to five years and if they survive past that range their performance continues to decline. I would certainly consider replacing the HDD.
    I can't get it to boot from the CD. It gets to the login window and then that's all she wrote
    That, too can be a function of age. I replaced the optical drive on my Pismo several years ago. I did the same for my daughter's Pismo. The issue could also be from a dirty or defective disk. Try a different disk to see if it works. If you have access to a second firewire Mac you can boot the computer from the optical drive of the other Mac with your Pismo in Firewire Target Disk Mode.
    cornelius

  • Seamless window application, start from xterm ?

    Hi,
    i setup SGD and a w2k3-server to suppor seamless application - works
    nice by testing a notepad.exe application.
    Beacause of some business needs, i have to start the seamless application
    from our own x11 application. Therefore, i wrote a small bash script which
    i can start manuelly from an seamless xterm running on the SGD server:
    /opt/tarantella/bin/bin/ttatsc -nofork -user username -password secret -swm \
    -application "c:\\windows\\notepad.exe" 192.168.126.139
    the notepad will be opened, but
    a) the update of the framebuffer will not work correctly.I must move the mouse over the menu of
    the notepad application the see the menue, ...
    b) i can not see an icon on my client windows desktop
    c) minimizing does not work either.
    I moved around to start the normal linux rdesktop application using the approch from
    http://www.cendio.com/seamlessrdp
    and all works - beside of
    a) can't see the minimized application on my client taskbar
    b) can not maximize the notepad application after miminize )-:
    So, could somebody help me to find a solution for my business
    need "Starting seamless window appliction from a seamless unix-app using SGD" ?
    thanks in advance
    best regards
    Danny
    (from opensource-online.org using SGD ;-)

    AFAIK, today on mayn browse rthis may be forbidden action by default. If IE7 may allow that at all at least user must add their server into the trust zone..then they can link from html into his local HD.
    Other is classic:
    < A *HREF file:///c:\some_file>run me!</ A>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can flex start a standard windows application

    Hi
    I am building an application in flex 3 and I need it to be
    able start other windows application and pass information to that
    application via the command line, is this possible? I have not been
    able to find any thing that says it can or cannot, I am assuming
    not at this stage.
    If I have to, I can use Air but I would prefer to stick to
    browser based, I really don't want the hassle of deploying the
    application.
    Thanks.

    "stephend" <[email protected]> wrote in
    message
    news:gbk8s8$6ot$[email protected]..
    > Hi
    > I am building an application in flex 3 and I need it to
    be able start
    > other
    > windows application and pass information to that
    application via the
    > command
    > line, is this possible? I have not been able to find any
    thing that says
    > it can
    > or cannot, I am assuming not at this stage.
    >
    > If I have to, I can use Air but I would prefer to stick
    to browser based,
    > I
    > really don't want the hassle of deploying the
    application.
    http://www.jeffryhouser.com/index.cfm/2008/4/22/Using-AIR-to-launch-other-applications
    I think this would probably work from a browser based swf as
    well.

  • Starting point for webdynpro application

    Hello All,
    I have some doubts regarding the webdynpro .
    what is the starting point of the webdynpro application after deploying.
    Thanks

    Hi there,
    When you create a Web Dynpro Application you have to choose what is the start plug. In general, the WD App use the default plug that is created automatically in the interface view. You can create your proper statup plug. There are tree kind of inbound plugs, Standard, Startup and Resume.
    Hope it help you!
    Regards,
    Luciano

  • IMovie '11 - when I open iMovie the application starts, but there is no window, If i plug in my iPhone the window will appear from the top right corner, but disappear again. HELP!?

    iMovie '11 - when I open iMovie the application starts, but there is no window, If i plug in my iPhone the window will appear from the top right corner, but disappear again, even if i use a drop down menu from the top menu bar and select, say 'New Project', it will appear from the top right corner, let me choose a new project, only to disappear again into that same corner.

    Argh I'm having the same problem! I always use imovie, and haven't had this prob before... apprantly imovie 11 is full of bugs like this. Anyone know if theres any way of downgrading?

  • Adobe Applications disappeared from my Windows 8 start screen

    Hi,
    After a recent update to my creative cloud all my adobe apps have disappeared from my windows 8 start screen. And when I search from them from the start screen it can't find them.
    If I use file explorer I can navigate to them, and the apps are still pinned to my task bar.
    Any ideas?
    Oh, and another issue I've just noticed, my creative cloud app won't log me in. Everytime I login it immediatly says "you have been signed out, please login in to continue.

    Try this discussion link:
    http://forums.adobe.com/thread/1444190?tstart=0#discussion-6273921
    For Windows 7, in short, you need to delete a file in the local files folder - basically resets linkages or something to the creative cloud. Then restart the CC desktop app.
    I hope this helps.
    Chris

  • LSMW with CI on System i and an additional Windows Application Server 4.70

    Hi together,
    I have a really tricky problem to realize a parallel processing LSMW Workload.
    In truth it isn't a problem to the parallel processing. It is a problem, how to declare the paths to the input files.
    The LSMW is splittet in four steps:
    1. Read data
    2. Convert Data
    3. Creating Batch Input File (IDOCS)
    4. Start Direct Input Program
    The first three points are using file in the IFS.
    In the 13 points of LSMW there is point " 7 Specify Files" where I can customize paths to the real existing input and output-Files, which are stored at the IFS on System i.
    For example:
    Legacy Data          On the R/3 server (application server)                           
        Materialtexte                  /usr/sap/direct/lsmw/material/matsta_text.txt      
    This works fine.
    Now we have added a Windows Applications Server in front of the 2-Tier enviroment to have more performance to the BTC workprocesses. Now we have two servers shown in sm51. One is the central instance (CI) and the other is the application server (AS), which is working together with the CI.
    <b>Now the big bug:</b> In the LSMW transaction, you can submit the job to batch (BTC) and can't choose the server (Instance) where the batchjob should run. So, sometimes the batchjob runs on the CI (iSeries) and sometimes the batchjob runs on the application server.
    But this is the problem, because the files in the IFS are only stored at IFS on iSeries. And if the Job runs at the application-server, the files is not found, and the job end abnormal.
    Now I tried to find a good solution. So I want to declare a patch in LSMW, that the batchjob is running successful at CI and AS.
    So I tried:
    \iSeriesshareusrsapdirectlsmwmaterialmatsta_text.txt
    But this is not really working, because the SAP WP can't find this file with this path.
    There is a second possibility: Not to submit the batchjobs by pressing F9 in the transaction LSMW but making an extra job in sm36 for each job. Not very smart !
    There is a third possibility: To duplicate the import Files to each Windows Application Server. Then it is possible to submit by pressing F9,  whatever server will be used.
    So my question is:  What is the right way? There must be some poeple in the world who have done a migration with iSeries an Windows Application Server together? Or not?
    best regards,
    Carsten
    Message was edited by: C.Schulz
    path corrected:
    iSeries\share\usr\sap\direct\lsmw\material\matsta_text.t
            Carsten Schulz

    >
    \iSeriesshareusrsap/direct/lsmw/material/matsta_text.txt
    Windows doesn't understand forward slashes, you need to use backslashes all way:
    Try the following on one of the application servers:
    Start - execute
    notepad \iSeriesshareusrsapdirectlsmwmaterialmatsta_text.txt
    If you can open the file, that's the way to go.
    You'd need to check in your program, whether the job is been executed on Windows or non-windows and substitute the slashes accordingly.
    Markus

  • Leopard 10.5.4 and Appleworks Starting Points

    I am a teacher and love using Appleworks 6.2.9 Starting Points Calendars but with my new Imac/Intel I can't seem to get it to work. I keep getting that file cannot be converted to an Appleworks document. Can anyone give me information as to how to get this to work?

    "I open AW, then go to File and plug down to Show Starting Points, click on it. Briefly I see the Starting Points box show up on the screen, then the screen shows up saying that file cannot be opened and do I want to report the problem to Apple. AW always quits at that point.
    This is a far different statement from your original "I can't seem to get it [AppleWorks 6.2.9 Starting Points Calendar] to work. I keep getting that file cannot be converted to an Appleworks document."
    If AppleWorks quits with a File cannot be opened" message while trying to open the Starting Points windows, that would indicate a problem with one of the files or folders in Starting Points. see below for some trouble-shooting steps.
    I have tried to start up Calendar Asst from the hard drive list and it bounces me out and says cannot open file, do I want to report the problem to Apple. The error message is the same whether opening it from AW or the hard drive. "
    This is normal behaviour. As I said earlier, the Assistants cannot be opened from the Finder, only from within AppleWorks. Trying to open an Assistant from the finder will result in the "cannot be converted" message you mentioned earlier. In AW 6, that means only from within Starting Points. (In the previous version Assistants and Templates were a menu item in the File menu.)
    Trouble-shooting steps:
    Qujit AppleWorks before each of these steps. At the end of each step, launch AppleWorks. If AW launches successfully, it indicates the problem lies within one of the folders/files removed during the step just finished; Go to "Successful launch?" If AppleWorks Quits with the same error message as before, continue with the next numbered step.
    1
    I would start with a maintenance step: Trash the contents of AppleWorks's Recent Items folder(s).
    Go to Mac HD > Users > yourname > Documents > AppleWorks User Data > Starting Points > Recent Items. Drag all or most of the items in this folder to the Trash. (The items are aliases to the named files. Deleting them has no effect on the files themselves.) Close the Recent Items folder.
    Create a New Folder on the Desktop. Name it AWUD, and drag all of the folders in AppleWorks User Data into the new AWUD folder.
    2.
    Create a New Folder, SP, on the Desktop. Go to Applications > AppleWorks 6 > Starting Points
    Drag the first two folders (Assistants and Backgrounds) into the new SD folder.
    3.
    Drag the next two folders from Starting Points into SP.
    4.
    Repeat step 3 until all Starting Points folders have been moved into SP.
    Successful launch?
    Quit AppleWorks. Return the folders you moved in PREVIOUS steps to their original folders. Leave the items you moved in the most recent step in the folder where you put them. Launch AppleWorks.
    A successful launch confirms the problem lies in one of the folders you removed in the most recent step.
    Quit AppleWorks. Return one of the folders to its original folder. Launch AppleWorks. Repeat with the remaining folder(s) until AppleWorks quits as before.
    Once you have located the folder containing the problem file, do a similar search of the files in that folder. Open the folder, drag half of the files it contains into one of the (now empty) new folders you created, then re launch AppleWorks. Put half the removed files back and launch again. Repeat until you locate the single file causing trouble.
    If it's one that you do not use, trash it. If you do want to continue using it, it will probably be necessary to re-install AppleWorks from your original disks.
    Regards,
    Barry

  • Installing a windows application - vsp file details.

    I am trying to install a 3rd party windows application as part of the VM.
    I guess that I need to edit the vsp file for the various prompts that the installation provides?
    The installation of the package (started with setup.exe) give me various options. Does the default.vsp file contain this kind of information?
    Can anyone please point me to any documentation about this file, its syntax or ways to create it?
    thanks
    jon

    You can look at page 90 of the dev guide: http://www.vmware.com/support/developer/studio/studio26/studio_developer.pdf
    If you have the appliance you can look at an example here: /opt/vmware/depot/winrepo/windows-vmware-tools/default.vsp
    You can insert your own implementation that is invoked for installation tasks using jscript,vbscript,cmd or program.

  • Remote Panel not working in Windows 7 Starter

    Hi all,
    We have an application that can be controlled via remote panel. This is working fine in Windows XP PC. But when I try to access the same by opening Internet Explorer in a PC running Windows 7 Starter OS, I only get the 'Downloading 0.00% of 0 bytes'. I have disabled the Windows Firewall and there is no antivirus software also. What could be the reason for this? How could I solve this?
    Thanks in advance,
    Priyadarsini
    Solved!
    Go to Solution.

    The system which had the problem was a netbook that came with Windows 7 Starter. We found out recently that there was some parental controls utility in the netbook that prevented the LabVIEW Remote Panel access. We were not aware of its presence & it had not shown any indication that it had blocked Remote Panel communication. We uninstalled this utility & the Remote Panel started working as intended. Thanks again for your help.

  • How can I get Firefox to run on Windows 8 Start page instead of my Desktop?

    I have the Icon for Firefox on my Windows 8 Start page, but when I click on the icon to use the Internet my view goes straight to my desktop.

    hi WarriorEthos, firefox on windows is a desktop-only application. it does not run in "metro" mode.

  • How can i close a windows application that works under vmware in am applescript

    Hi there,
    On my roof I have a set of solar panels. The daily score of these panels are only visible by using a Windows application.
    So I use vmware on my Imac to start Windows 7 on Bootcamp, this all by using a applescript in the automator app.
    In the script vmware is starting up and then i made a task in Windows that starts up the specific application after the Windows startup. After a delay of 180 seconds the script fills in a password an gives a return. That works well.
    Unfortunately it runs perfect the first tim a and then the second time, the specific application does not start. Only Windows starts up, the rest of the script does not work the right way, exempt closing the vmware, that goes as expected. So I think that the closing command that I give in the script:
    tell application "VMware Fusion"
    quit
    end tell
    causes a problem. The closing of the application within Windows is perhaps not done on a proper way.
    Therefore I am looking for a way to close that application first and then closing Windows 7 and then VMware.
    Thanks in advance for your help.

    As a completely different approach, I'd have a look at the raw network traffic with tcpdump or equivalent, and see if I could figure out how to access this data — if you're lucky, it's a fairly standard interface of some sort; HTML queries, possibly. 
    Start with a port scan of the controller for the panels (using Network Utility.app in OS X, or another tool), and see what IP ports are open and active.
    Is there a vendor and model associated with the controller for the panels?  That might turn up some software other than this Windows application/

  • Running a control on application start up

    Hi,
    I am using Weblogic workshop with the netui and controls framework.
    Does anyone know if there is a way to be able to access a control when the application starts. I need to initialise some static data on application startup.
    Normally I would just use a struts plugin to run some init routine, but because we are using DBControls to access the database I can't do this because I am unable to access controls from a POJO.
    Thanks for your help,
    Adrian

    Well two ideas (if ur on windows) u could try are -
    one, if you had a class file you could simply create a
    batch file on windows that says java <class> and then
    put that batch file in your startup so that the class
    is run at startup or else you could think of modifying
    the registry keys on windows to run this class at
    startup - whichever works for you.Or you could just jar the program up, adding a Main-Class indicator in the manifest, and then add a shortcut to the jar to the startup folder, as someone else stated. Theres little need to go messing around with DOS batch in modern windows.

  • Windows explorer + other windows applications crashing regularly at resume from sleep and hibernate

    Good evening,
    I have a Thinkpad W510 (4319-29G) running Windows 7 Pro 64bit. The system is loaded with the latest software and drives from Lenovo including BIOS 6NET74WW (1.34), upgrade was done Dec 7th (windows update performed Dec 15th).
    The machine has
    - 8Gb RAM
    - nVidia Quadro FX880M, driver version is 8.17.12.5896, 7-9-2010 and video card BIOS is 70.16.5f.0.b
    - dual harddrives,
       - one Seagate Momentus XT 500Gb (ST95005620AS) FW rev SD23 in the main location with C: and some other partitions
       - one Hitatchi 320 Gb (HTS723232L9SA60) FW rev FC4ZC50B in the bay.
    - Intel Centrino Advanced-N 6200 AGN, driver version 13.3.0.24, 7-14-2010
    - Intel 82577LM Gigabit Network Connection, driver version 11.5.10.1030, 7-22-2010
    Recently I have experienced crashes of multiple windows components at resume from sleep and hibernate.
    It seems to happen when swithing location (from work to home) and thus switching from docking station with wired network connection to no dock and wireless network connection (dont know if this has any bearing but anyway).
    In the event viewer I typically have some 6-12 application errors logged. Sample output from event viewer is:
    Log Name: Application
    Source:Application Error
    EventID:1000
    Level:Error
    Logged:2010-12-15 20:30:02
    Task category100)
    Keywords: Classic
    Computer: xxxxxxx (my computername)
    Then for each application the following detailed data is written in event viewer in the general tab:
    #1
    Faulting application name: rundll32.exe_nview64.dll, version: 6.1.7600.16385, time stamp: 0x4a5bc9e0
    Faulting module name: nview64.dll, version: 6.14.10.13527, time stamp: 0x4c35752f
    Exception code: 0xc0000005
    Fault offset: 0x00000000000f0786
    Faulting process id: 0x115c
    Faulting application start time: 0x01cb9bd59882f1f6
    Faulting application path: C:\Windows\system32\rundll32.exe
    Faulting module path: C:\Program Files\NVIDIA Corporation\nView\nview64.dll
    Report Id: b606b17d-0881-11e0-be39-00a0c6000000
    #2
    Faulting application name: taskhost.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x10c0
    Faulting application start time: 0x01cb9bd5694caebe
    Faulting application path: C:\Windows\system32\taskhost.exe
    Faulting module path: nview64.dll
    Report Id: b6ae8cb2-0881-11e0-be39-00a0c6000000
    #3
    Faulting application name: sidebar.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc9e1
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x6f0
    Faulting application start time: 0x01cb9bd5986a397a
    Faulting application path: C:\Program Files\Windows Sidebar\sidebar.exe
    Faulting module path: nview64.dll
    Report Id: b6bd0bd9-0881-11e0-be39-00a0c6000000
    #4
    Faulting application name: Explorer.EXE, version: 6.1.7600.16450, time stamp: 0x4aebab8d
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x0000000008c3b350
    Faulting process id: 0x1210
    Faulting application start time: 0x01cb9bd569d9ae8e
    Faulting application path: C:\Windows\Explorer.EXE
    Faulting module path: nview64.dll
    Report Id: b6d21ac7-0881-11e0-be39-00a0c6000000
    #5
    Faulting application name: Dwm.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc541
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800ba570
    Faulting process id: 0x11c4
    Faulting application start time: 0x01cb9bd569aa125c
    Faulting application path: C:\Windows\system32\Dwm.exe
    Faulting module path: nview64.dll
    Report Id: b72bfbe8-0881-11e0-be39-00a0c6000000
    #6
    Faulting application name: rundll32.exe_PWMTR64V.DLL, version: 6.1.7600.16385, time stamp: 0x4a5bc9e0
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x1450
    Faulting application start time: 0x01cb9bd59995023a
    Faulting application path: C:\Windows\system32\rundll32.exe
    Faulting module path: nview64.dll
    Report Id: b7e4521b-0881-11e0-be39-00a0c6000000
    It seems that a module "nview64.dll" is always the first application to crash. I suspect this has something with graphics to do.
    I dont know if this event triggers the following crashes or if it is so that the display is initialized before the other programs.
    After all crash diagnostic messages have been shown windows explorer restarts and also other applications restart but a lot of system tools in the system tray are gone so a cold start is needed to restore all tools again.
    I really would appreciate any help and suggestions how to fix this really annoying issue.
    Thanks, Anton

    I had a similar issue, as soon as a described even a little bit of it to warrenty support they sent someone to swap the board
    It seems thats the only fix, its been fine since 

Maybe you are looking for