Desktop App generator general question

So I'm trying out the Desktop Application generator NetBeans feature and having an issue. For the automatically generated File menu, I use the Netbeans "Set Action" feature for a menu item. It generates an empty method in the main class (as well as the (locked) listener code in the GUI class). How can I get my GUI instance from the main class when the GUI is set up to be instantiated as follows: show(new DesktopApplication2View(this));

I want the changes to affect the present GUI (auto generated with the netBeans desktop application feature) in which a SingleFrameApplication class is inherited by the main class. I'm just following netBeans's desktop app framework here. So I've tried working with the getMainFrame() method of the SingleFrameApplication class which returns a JFrame, type casting it to my DesktopApplication2View (GUI class (or boundary class, right?)), but DesktopApplication2View isn't a JFrame, it's a FrameView. So, my question basically is:
if my gui is instantiated using this netbeans desktopapp framework, which generated everything except the code inside loadFileChooser(), how do I access the already visible instance of my GUI class?
* DesktopApplication2.java
package desktopapplication2;
import java.io.File;
import javax.swing.JFileChooser;
import org.jdesktop.application.Action;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;
* The main class of the application.
public class DesktopApplication2 extends SingleFrameApplication {
     * At startup create and show the main frame of the application.
    @Override protected void startup() {
        show(new DesktopApplication2View(this));
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
    @Override protected void configureWindow(java.awt.Window root) {
     * A convenient static getter for the application instance.
     * @return the instance of DesktopApplication2
    public static DesktopApplication2 getApplication() {
        return Application.getInstance(DesktopApplication2.class);
     * Main method launching the application.
    public static void main(String[] args) {
        launch(DesktopApplication2.class, args);
    @Action //the method skeleton was auto-generated in this class instead of the GUI class
    public void loadFileChooser() {
        final JFileChooser jfc = new JFileChooser();
        int a = jfc.showOpenDialog(null);
            File file;
            if (a == JFileChooser.APPROVE_OPTION) {
                   file = jfc.getSelectedFile();
                   String s = file.getName();
                   if(s.charAt(s.length()-1)!= 'f' && s.charAt(s.length()-2)!= 'i' && s.charAt(s.length()-3)!= 'g')
                       System.out.println("Not a gif");
                   else{
                                      //I want to update my GUI here
}Edited by: halofan on Jun 5, 2008 3:10 PM

Similar Messages

  • Questions about networking a desktop app

    So the background first: I'm working on a hobby program, and wanted to try my hand at networking it. It's a desktop app (a simple game) that two or more users can play at the same time. There's no centralized server to connect to, it will be an ad hoc connection. One user hosts a game (starts a server) and then others join the game (start their clients). I've done a lot of research, but still have some unanswered questions. I plan on using ssl encrypted socket connections. I used this tutorial to learn about trust managers and such.
    My questions are:
    1) What's the best way to give the users the info they need to connect to each other? I haven't looked into it yet, but I'm assuming it's not to hard to display the server's ip address, which they can give to the clients to connect to the server. PC games used to do this years ago before companies began hosting matchmaking services. Is there more required than that?
    2) What's the best way to pick a port number that all user's have access to? I know I need to pick a port that isn't registered by another app, and that the port number will need to be given to the clients along with the server's ip. If the server is able to open that port, is there a situation where clients wouldn't be able to access that port?
    3) Since this is basically a toy, I don't want to to the trouble of something like Verisign for security. Will a self-signed certificate authority be adequate? My concerns are not opening user's computers to attack, and protecting the data in transit. I know ssl will protect the data, but I'm not knowledgable with security to be sure if a shared trust manager will be enough to only let the app access the connection. What are the risks of someone bypassing the security and gaining access to our systems?
    I've never written an application that had to deal with network security, so please pardon my paranoia, and thanks very much for any help.

    If you are getting the week or intermittent wireless connection then,try the following settings on the router...Under the Wireless tab,Change the Channel Width to 20MHz and Channel to 11..Provide unique SSID.Under the Advanced Wireless Settings..Change the Beacon Interval to 50,Change the Fragmentation Threshold to 2304,Change the RTS Threshold to 2304 and Click on Save Settings...Power Cycle the network and check the connection.
    WPA2 is very secured Secured type,so it is advisable to use it.However,it is not necessary to use WPA2.
    If you are using "N"Router then,to get the full advantage of N Speed,you should "N" Adapter.
    If you want to set the static DNS on the computer or any other wireless device then,you can set any DNS numbers.
    To repeat the wireless signal of the N Router,I would suggest you to go for an Access Point like WAP610N.

  • Desktop apps moved and General settings app moved

    My 2 year old daughter loves the ipad and plays games, watches cartoons, etc. I set up restrictions under the general settings for her safety. Some how she or one of my family members moved or deleted some of the apps including general settings. How can I get my apps and general settings back? I scrolled and did not see the general settings app to reset desktop apps.  Thanks in advance.

    They can't be deleted, as they are native to iPad.  If you have scrolled to additional pages on your iPad and still can't find them, you can use the search function to find them, or you can connect to your laptop and find them in iTunes and move them where you want.  To find them using search, with your home screen open, hit the home button once and the search bar will appear.  Type in the name of the app and it will bring it up.

  • Windows App Certification Kit - Test Fails for Validate Desktop App at "Write appropriate Add/Remove Program values"

    Hi,
    I am trying to validate a .Net Framework 4 WinForms application for use in the Microsoft Partner Network portal.
    I am using Windows App Certification Kit 3.4 for Windows 8.1 , and the Validate Desktop App option.
    To build the package I am using InstallShield 2012 SPR Limited Edition (for Visual Studio), and the validation fails
    only with the following error (please also see the attached image):
    Clean reversible install test: Failed to Write appropriate Add/Remove Program values
    Error Found: The registry population test detected the following error: app didn't create the required registry entries.
    A non-optional value 'DisplayName' is missing or invalid (same for 'Publisher', 'ProductVersion')
    Please note that I have filled in all the publisher/product details in the InstallShield project, on the General Information page.
    Also I have tried to use the Microsoft Visual Studio Installer Project for VS2013, and the validation failed with the exact same error.
    (https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d)
    Any help would be very appreciated.
    Thank you.

    You may need to add the necessary info to the app’s Windows Installer package so it can configure Add/Remove Programs in Control Panel correctly. Setting these properties automatically writes the corresponding values into the registry. From the picture,
    you are missing some necessary information about your desktop app.
    Also You need the correct admin permissions to write to the registry.
    Please refer to this thread:
    http://stackoverflow.com/questions/21182856/windows-app-certification-kit-test-result-app-didnt-create-the-require-regist
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Building a desktop app - use AIR or not?

    Hello, I'm guessing that the keyword "desktop" would make you recommend I use Adobe AIR if I'm building with Flex.  Basically, we're building a desktop application that will occasionally sync with the server where a separate but related application resides.  Most of the time, the desktop app needs to be able to function with or without network connectivity. 
    So far, we have begun by playing with Flex and running it in a browser on a local machine.  We could simply use XML files for local storage instead of a database, and it seems like we can get a fair amount of functionality implemented this way.  However, I'm wondering if we should definitely be using AIR instead. 
    I'm coming with a server-side Java background, so I'm also trying to figure out how people write the business layer in this world (the business logic tier in between the presentation and data/service layers).  A lot of places I'm finding online keeping talking about Flex being for presentation only, but with an Adobe AIR app, do people often write business objects that sit between the GUI components and the database?  In some of the AIR programming guides, I'm not seeing any mention of that.
    I'm trying to make a case for AIR, so I need a little bit of help from you...
    Thanks!

    I'm coming with a server-side Java background, so I'm also trying to
    figure out how people write the business layer in this world (the
    business logic tier in between the presentation and data/service
    layers).  A lot of places I'm finding online keeping talking about Flex
    being for presentation only, but with an Adobe AIR app, do people often
    write business objects that sit between the GUI components and the
    database?  In some of the AIR programming guides, I'm not seeing any
    mention of that.
    I'd like to add a "me too" to this.  I haven't done a lot of research into AIR yet and it's not immidiately obvious what's involved with getting offline functionality.  I think I basically have the same question as the OP; do I end up (re)writing a bunch of business logic in the Flex client (I don't want to).
    I'm still using Java EE on the server for a (business logic) data access layer.  Specifically, I'm using a DTO inheritance strategy and setting up to auto-generate (mirror) .as DTOs with (Maven) flexmojos (I think flexmojos uses GraniteDS, but I use BlazeDS - the code generation tool shouldn't matter AFAIK).  So far, I'm quite happy with how the whole setup works.  However, I'd love to hear what kind of Java + Flex + AIR development strategies others have been finding successful since a significant portion of the online resources and documentation I've found tend to be somewhat trivialized.
    I hope I'm not hi-jacking the OPs question here (if so, I apologize), but what I'd like to know is if AIR is capable of any 'for free' type offline capabilities (like the way BlazeDS and LCDS 'just work').
    Ryan

  • Creative Cloud desktop app won't sync with CS6 applications

    I am running a Windows 7 64bit machine. I had been running CS6 and CC, but had developed a wide range of problems. With the assistance of Adobe technical support I removed all Adobe software from my pc.
    My plan was to do a clean install of CS6, apply all of the updates, and then decide if I wanted to continue with the full CC subscription before installing any CC software. The initial install went fine, as did a whole bunch of upgrades. Along the way Adobe upgraded the Adobe Application Manager to the desktop Creative Cloud app.
    Within Creative Cloud it showed an update to Photoshop CS6 (something to do with a Creative Cloud version 13.1.2). So I clicked on update and got an error message and the advice to uninstall and reinstall Photoshop CS6. I followed the advice. I then started Photoshop CS6 and selected the Help -> Updates option. It launched the Adobe Application Manager and I was able to install the update. So now I think everything is good with CS6 installed and up to date, and no CC software has been installed aside from the desktop app.
    BUT when I run the Creative Cloud desktop app it still show that there is an update for Photoshop CS6! Clicking on the update button generates a message that the update failed due to a download error.
    So my problem is how do I get the CC app in sync with my actual CS6 applications?
    My second question is do I need to uninstall AAM to preclude this happening in the future (and if so, how)?

    Then it would appear the updates have been applied successfully.  You may want to try implementing solution 2 of CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • Multi-Factor Authentication desktop app?

    Is there a desktop app (Win 7/8) for authenticating against Azure Multi-Factor?  I've currently got a MFA provider spun up in Azure and the server installed on prem.  We are currently testing with it for two factor authentication to an RDS deployment
    and it seems to work well.  So far I've used both the phone call and text authentication methods and I'm working on getting the mobile app piece to work. 
    We do have some instances though where users my not have dedicated cell phones.  Is there an app that can be installed on the desktop and works with the Azure MFA that will allow them to two factor auth?  Perhaps allowing them to use a known pin
    to generate a one time passcode?
    Thanks

    No, there isn't one. There *might* be one coming with windows 10 and universal apps, but then again, being able to just use an app on the PC you are accessing the resource from kinda negates the whole value of the additional auth Factor.
    MFA is not limited to mobile phones only, use a regular one if needed. Or even an OATH token. Lastly, you can always fallback to the security questions, since you have the MFA server.

  • Desktop apps developing: where to start

    Hi!
    I wanna develop some nifty little helpers doing common daily stuff, like checking the up time of the internet connection and displaying it anywhere on the desktop or in the gnome-panel. that's just an example. a lot of this tasks can be done with cronjobs and bash-scripts, but for graphical stuff there's somethin' else needed.
    The question: Where to start? I know, a forum search and googling brings up a lot of tutorials, but I even don't have a point where to start, which programming language is best for apps like this.
    And no, I'm not looking for general programming tutorials.
    Thanks in advice!

    Well there's plethora of ways you can do build desktop apps. The language is mostly irrelevant nowadays, choose whichever you prefer, C, C++, C#, python, perl, tcl. You may start with deciding on language and possibly toolkint you would wish to use. Some hints, using C you have GTK as your primary toolking, then goes GNUstep thing, Xlib as an option if you need sort of hackish feeling, Motif if you have access to libraries and some ancient Unix system. If you would prefer C++, there's Qt (excellent documentation on http://doc.trolltech.com) and GTKmm.  I personally prefer Qt since it's easy, intuitive and is a base of KDE.
    You may end up using python which, surprisingly,  seems to be preferred by most of people on the forums. If so then pygtk or pyqt is a must.
    I would discourage from using horrid toolkits like wxWidgets, no fun at all.
    Other thing for desktop apps would be inter-app communication and sharing common functionality, which is handled by Kparts & DCOP for KDE3, and (correct me if I'm wrong) bonobo - a CORBA-like thing for gnome (?).
    For KDE these will be useful:
    http://developer.kde.org/documentation/
    API reference
    http://developer.kde.org/documentation/library/
    Both Qt and GTKmm have nice tutorial which help you get started quite easily.
    However if you would like to write conky like stuff, then unfortunately Xlib is the way:
    http://www.tronche.com/gui/x/
    Some common desktop standards (system tray, iccm window manager etc.) are provided here:
    http://standards.freedesktop.org/

  • Why is it so hard to find the download link for the Creative Cloud desktop app?

    So - I have a subscription and I needed to move the location where the files were on my computer. The easiest path is to uninstall and reinstall. So I used the Adobe uninstaller tool (which, even though I told it to uninstall everything, does not uninstall everything). Then I rebooted. All Adobe CS creative cloud desktop apps are gone. I log into my Adobe account online, and the only thing I can find are downloads for downloading "trials" of the adobe apps - this is whilst being logged in. And to download the trial it starts to ask me questions about how I will use it etc. so I didn't bother.
    When I go to the page that has what ostensibly looks like it will lead to the Adobe creative suite downloader/desktop tool, it takes me to the list of ALL adobe desktop app "trials".
    I finally found it by hunting around in the help screens and Google for five minutes, but it's still obnoxious that there is no link to directly download the Creative Cloud desktop app here, which is where it sends you:
    http://www.adobe.com/creativecloud/catalog/desktop.html
    Instead all you see are a bunch of "Trial versions", even though these are included with the adobe creative cloud subscription.
    So I don't really have a question, more of a rant at the stupidity of the way this is set up. When I'm logged in, I should be able to access the downloads, or at least the tool that lets me download the downloads, without spending time hunting around for it. It's ridiculous that it's not set up that way currently.

    Same with me here is the link I found and used
    https://creative.adobe.com/products/download/creative-cloud?version=2.0

  • I did made a copy of all my CC programms. for using on my other workstation. now is the CC desktop app not syncing the programme information. it do not see or sync the installed programms properly. what can i do. i do not want to download the hols set. be

    I did made a copy of all my CC programms. for using on my other workstation. now is the CC desktop app not syncing the programme information. it do not see or sync the installed programms properly. what can i do. i do not want to download the hols set. because of a slow connection

    If you are getting emails from these forums then you probably accidentally clicked on one of the links on the forums page where all the questions are listed e.g. at the top right of each forum's page there is text box with Actions and Notifications in :
    So far you've posted in the iTunes Store forum :
    https://discussions.apple.com/community/itunes/itunes_store#/
    And the Using iPad forum :
    https://discussions.apple.com/community/ipad/using_ipad#/
    If on either of those forums that box says 'stop email notifications' instead of 'receive' then click on it and it should stop that forum sending emails to you.
    There are full instructions on this page for stopping emails, as there are other places where they might have been set 'on' :  https://discussions.apple.com/docs/DOC-3661
    This is your original post for iTunes Match : https://discussions.apple.com/message/22647293#22647293
    And this page lists your posts (you can click on each post on it to be taken to it's thread) : https://discussions.apple.com/people/suzettemg?view=overview

  • I get the erroor message 'couldn't load XPCOM' but only when i try to access my Netflix Desktop App . I have tried unsuccessfully to corect this. My OS is Linux

    After the last Firefox update to Firefox 19.0.2, I got the error message "Couldn't load XPCOM" when i attempted to open my Netflix Desktop App, I did not get that error message when starting Firefox only when trying to open Netflix. I thought it had something to do with Netflix so I removed it then reinstalled but the error message continued. I searched and asked questions to no avail. I did a command line search: "locate /xpcom" It came up with a list of files relating to xpcom, only one refering to Firefox itself and they all ended with xpcom.dll. When i did a search in the File folder I found this:
    usr/lib/firefox/libxpcom.so .
    One of the people trying to help told me this:
    "The error is caused by the lack of the path "/usr/lib" in the environment variable LD_LIBRARY_PATH
    Solution
    Add the /usr/lib path to the environment variable in this way:
    export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH"
    I was informed to do the following:
    "Get to a command line prompt (CLP) and use gedit to add that line to your .bashrc file:
    your.account> gedit .bashrc
    when you're done, just save and exit. Log out and back in, and from then on whenever you log in, it will be in the LD_LIBRARY_PATH for you. You might also want to copy .bashrc to some sort of saved version; I use bashrc.sav."
    No change.
    I have done a reinstallation of Firefox and numerous reinstallation of Netflix all with no change.
    Is there a chance that a complete removal of Firefox followed by a reinstallation correct the problem? i don't want to do that unless it is the only solution.
    Oddsbodkin

    Hello Oddsbodkin,
    It looks like the creator of Netflix Desktop has a site for the project here:
    https://answers.launchpad.net/netflix-desktop/
    I would try posting your question there and see if anyone else has encountered this error and has a solution.
    Cheers, Patrick

  • General question on SQL Server 2000 to Oracle 10g

    Hello all,
    I just have a general question on migration from SQL Server 2000 to Oracle 10g using SQL Developer.
    How does it migrate Users with proper privileges from SQL Server to Oracle? Follow the interface steps? Or should the users be created on destination Oracle side?
    Thank you.

    Hi,
    It depends which type of migration you are making.
    For a 'Standard' migration when you migrate data a 'create user' statement is created as part of the migration and you will see this in the generated code.
    If you are using the 'Quick' migration option then you need to create the Oracle user or use an existing user to receive the data.
    Your best option is to review the documentation available from -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    or directly from -
    http://download.oracle.com/docs/cd/E12151_01/index.htm
    and then get back with specific questions if this does not give you the information you need.
    Review the chapter -
    2. Migrating Third-Party Databases
    in -
    Oracle® Database SQL Developer User’s Guide Release 1.5
    Regards,
    Mike

  • General question about iTunes Match and multiple libraries

    Hello to everyone,
    I have a general question about the iTunes Match service, which is available since yesterday in my country (Italy). Currently my library situation is the following:
    Computer A (desktop, Windows 7): "big" iTunes library (about 20 GB), at the moment not associated with my Apple ID
    Computer B (MacBook Air 2011): "small" iTunes library (about 5 GB), associated with my Apple ID
    At the moment, both my iOS devices (iPhone 4 and iPad 2) are synchronized with the smaller library on the MacBook Air.
    Question is as follows: should I subscribe to iTunes Match, would it be possible to upload the "big" library (provided I associate it with my Apple ID) to iCloud while keeping my devices synchronized with the "small" one?
    Ideally, at the end of the day, the situation should be the following: both iOS devices with music from the small library + possibility of downloading songs from iCloud (coming from the big one). Is this possible?
    Maybe the question sounds stupid, but I want to be sure about this before paying for the service.
    Thanks a lot.

    Yes, you could also associate your larger library with iTunes match if you associated your Apple ID with it. However any purchases in the library made from another Apple ID will not be matched with iTunes much.
    If both libraries are part of iTunes match, then all your devices will see all of the content from both libraries, which content you choose to have on those devices and which you have accessible via iTunes match is entirely up to you.

  • Include Air ( desktop app ) inside Mobile app permited by Apple / Android?

    Include Air ( desktop app ) inside Mobile app permited by apple / android?
    This is my question....:
    I need a "viewer" app run in a desktop machine... via p2p... ( done and working )
    I will like to include it in my iOS / Android Release, an then by example move it to the documents folder.
    Run iTunes and then copy the file from the shared document folder.
    Is this permited by apple / android / adobe ?
    Thanks....

    just tracing some kind of tests I'm doing.
    A couple of hours ago I left working 2 instances of my Application, leaving alone this computer: one instance is the Mac desktop version and the other one is the Web version. In this case both versions were running on the same computer (an iMac with OS X Mavericks):
    1) the AIR/Mac version have been recompiled yesterday with the new AIR4(.0.0.1619 - AIR 3.8 is used to fall in a equivalent way - no changes)
    2) the Web version have been compiled targeting FP 11.8 and it is running on Chrome browser with PepperFlash NOT disabled (which reports version MAC 13.0.0.80, the latest)
    I left working both the Mac and the Web versions of the Application opened on the pc screen (= not minimized) but kept totally behind some Terminal/ssh windows (= not on OS focus and the system is not asked to update any screen area of the app for sure).
    I came back after about 2 hours and I got the browser version connected&running (but it is not a rule) and I also found the AIR-based Mac version disconnected (uau, usually I found the app disconnected but with the screen freezed at last user look ->) which rapidly reconnects upon my click on the Apple dock icon (bring to front).
    Why these different behaviours? I ask to myself.
    The two versions of the software are TOTALLY the SAME application: except for the first Flash file (a 24kb swf file for the Web version and a 170kb dmg file for the Mac version), basically a platform-dependent loader, both versions loads the same remote swf modules. Of course t is AIR (or my first Flash file?).
    I attach the source code of the Mac version of the [first file] AIR-based application at the following url:
    http://92.63.230.100/others/others/wtstarter_mac.as.txt
    _Adobe_, is it a bug? isn't it?
    mc

  • Converting desktop app to mobile app

    hi i have developed a simple java desktop app for making currency conversions, now i want this to work on my mobile, what are the steps to take to convert it, or do I have to start from scratch? thanks

    I think it'll be easier to start from scratch. Java ME classes, even those with the same package and class names, are not the same as their Java SE big brothers.
    Here's a link to a [J2ME Tutorial|http://today.java.net/pub/a/today/2005/02/09/j2me1.html].
    If you have any Java ME related questions, please post them to the [CLDC and MIDP forum|http://forum.java.sun.com/forum.jspa?forumID=76].
    luck, db

Maybe you are looking for

  • How can i make my mobile me account email my primary email?

    I have an apple id and a mobile me account. I want all of my apple mail such as purchase receipts from the itunes store to be sent to my mobile me account address instead of the primary email adress for my apple i.d. Ever time i go into account setti

  • 55HT1U LCD TV - how to play home videos from external hard drive

    Hey guys, I'm connecting my external hard drive to my 55HT1U LCD TV via HDMI to watch home movies. The TV is able to recognize the external drive, I'm able to browse folders and see pictures, but the movie files are not recognized! Does anyone know w

  • Tracking AP downpayment in Purchase Order(PO)

    Hi, We made our AP down pymt via FI. However, when we create the PO, we are not able to see if a down pymt has been made for such PO. Are there any ways that we can track the down pymt in the PO? Thanks, CW

  • Painting JComponents with CellRendererPane

    I wrote a class that paints arbitrary JComponent that way it looks like itself but without any specific behavior. For example I paint JButton. It looks like JButton but it is not highlighted when mouse moves over it. It ignores clicks on it etc. Its

  • Early 2009 Mac Pro Memory Question.

      I currently upgraded to 4GBx3 from OWC.  I want to fill the last slot and contacted OWC.  They told me that I had to purchase  2 modules as they are in pairs.  Went to crucial and they said I could add a single 4GB.  I am a little confused about th