Adding a class to a project in sunone studio that already has a main method

i have a frame class and it contains a main method, I can't figure out how to add a class that makes use of the JDialog and call it from the main class. When i try to add a JDialog, it creates its own main method.
If abc.class is my main method class and dcf.class is my class that makes the dialog GUI, I want abc.class to be able to call it, i can't figure out how to do this in Sun One Studio 5

Having a main() in the JDialog doesn't hurt. It lets you run the JDialog as a standalone - make sure that it looks good, etc. When you run your other class, the main() won't get called. (And you can delete it when you're all debugged.
Alternatively, create a new class, then start it by saying
class MyDialog extends JDialog {
}S1S will be completely happy if you do it that way.

Similar Messages

  • I need to add bullets to a list that already has a p class associated with it and they are links everything I try messes it all up

    Okay, so I am hating lists at this point! I have a set of links that have a class associated with them so they turn blue on rollover. Now I need to add those red bullets in front of the links. I Have the following css:
    .links a:link {
    text-decoration: none;
    color: #333333;
    text-align:left;
    .links a:visited {
    text-decoration: none;
    color: #000000;
    text-align: left;
    .links a:hover {
    text-decoration: underline;
    color:#003399;
    text-align: left;
    .links a:active {
    text-decoration: none;
    color:#333333;
    text-align: left;
    Then for the bullets I have:
    .classol {
    text-align:left;
    color: red;
    list-style-position: inside;
    This is the list on the page of links:
    <p class="links"><a href="http://www.cslb.ca.gov">California State Contractors License Board</a><p class="links"><a href="http://www.goodbuilders.org/index.asp">El Dorado Builders Exchange</a> </p>
              <p class="links"><a href="http://www.video.dot.ca.gov">Cal Trans Live Streaming Traffic Video</a></p>
              <p class="links"><a href="http://www.dgs.ca.gov/default.htm">California Department of General Services</a></p>h
    THE PROBLEM:
    If I add the <li class="classol"> in front of the links it messes the alignment up and the link turns red. I am sure this is a simple fix, but I am baffled by this whole list thing. I have tried every arrangement possible between these two and cannot get it to look and "act" correctly.
    As always any help is appreciated.
    THANK YOU!

    Your code has several violation errors in it, run your pages through this on-line validation tool:  http://validator.w3.org/
    Also, you're suffering from a common newbie mistake which is division-itis.  Try to simplify your layout by using a few key divisions for elements that will be used only once like the header, menu, content, footer.  Then use division classes for items you may use more than once per page. Lastly, you shouldn't try to fit content over a large background image.  Read why here:  http://alt-web.com/Backgrounds.shtml
    To answer your questions about lists, try this:
    CSS
    <style type="text/css">
    /**links**/
    a:link { color: #000000; /**black**/  text-decoration: none;}
    a:visited {color: #333333; /**charcoal**/  text-decoration: none;}
    a:hover {color: #FFFF00; /**yellow**/  text-decoration: underline;}
    a:active {color: #000000; /**black**/  text-decoration: none;}
    /**link list**/
    .link ul,.link li {color:red; line-height:1.5; font-family:Georgia, "Times New Roman", Times, serif; font-size:0.85em; list-style: square;}
    </style>
    HTML
    <ul class="link">
    <li><a href="http://www.cslb.ca.gov">California State Contractors License Board</a>
    </li>
    <li><a href="http://www.goodbuilders.org/index.asp">El Dorado Builders Exchange</a> </li>
    <li><a href="http://www.video.dot.ca.gov">Cal Trans Live Streaming Traffic Video</a></li>
    <li><a href="http://www.dgs.ca.gov/default.htm">California Department of General Services</a></li>
    <li><a href="http://www.cpuc.ca.gov/puc">California Public Utilities Commission</a></li>
    <li><a href="http://www.coldwatersaloon.com">Coldwater Saloon</a></li>
    </ul>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/

  • Adding another iPhone to a computer that already has one registered

    My iphone was recently stolen, and I am getting another one to replace the stolen one. Since I will be registering another phone to a computer that has an iPhone registered to it that no longer exists, will I be able to register another one? Also, I am on a family plan with my parents and siblings, so will I be able to keep the same account and number? Currently, I have suspended service from the stolen ipod.

    An iPhone is not registered to a particular computer. You can activate an iPhone with one computer, and sync it with another. You can sync iTunes content and transfer photos from one computer, but you can sync contact information, calendar events, and bookmarks with multiple computers - with two Windows PCs, with two Macs, or with a Mac and a Windows PC.
    You will be able to activate and sync your replacement iPhone with at&t with iTunes on the same computer that you activated and synced your iPhone with that was stolen. You will be able to activate your iPhone with the same account and phone number, but if you contacted at&t to report that your iPhone was stolen, you need to contact at&t to inform them that you purchased a new iPhone and you want to activate your new iPhone with the same number before you do the activation process with at&t.
    iTunes creates and maintains a backup for each iPhone that is synced with iTunes on the same computer. After activating your iPhone, select Restore instead of syncing, and select from the backup for your iPhone that was stolen. Your settings from your iPhone that was stolen will be restored to your new iPhone before the sync process.

  • Adding iPhoto'04 library to iPhoto'11 that already has a library

    I have been running iPhoto'09 on my MBP for about 1.5 years and just installed iPhoto'11 and all appears to be fine with the 1500 or so pictures in the current iPhoto Library for iPhoto'11. I have about 4,000 pictures on an 6 year old G4 with iPhoto'04 that I want to put on the MBP.
    Based on reading other posts I am in the process of copying the "iPhoto Library" folder from iPhoto'04 to another drive (it is currently being copied to a 8 GB USB drive as I type this message). Before this is copied from the USB drive into the Pictures folder on the MBP, should it be renamed to something different than "iPhoto Library" (ie. iPhoto 04 Library), since there is already an active "iPhoto Library" file (a Package File) in the Pictures folder? Once I have the iPhoto 04 Library file copied to the Pictures folder on the MPB, is the next step to launch iPhoto'11 with the option key pressed and select the iPhoto 04 Library? If I followed other discussions, this will then convert the iPhoto 04 Library to iPhoto'11 format.
    After this is seems like iPhoto Library Manager would be a good way to work with the two libraries in order to arrange the pictures and albums as I like.
    Thanks for any feedback or suggestions on the above process.

    Hello TD -I solved the problem late last night before I saw your reply about using iPhoto Library Manager to rebuild the library in question. Here is what I did. Note that I have been using iPhoto version 9.1.1 all along, so it was not an issue of library updates losing data that was initially reported by many users of the original 9.0 version.
    1. The library I had been using with iPhoto'09 was successfully updated when I initially upgraded to iPhoto'11, so all was fine with that. The problem was that iPhoto'11 was not able to update a library brought over from iPhoto'04 on my old G4 tower.
    2. After reading that some users were going back to iPhoto'09, I thought I might try that as a way to read the iPhoto'04 library. Deleted iPhoto'11 and associated package receipts from my MBP, but left the new iPhoto'11 library in the Pictures folder. Installed iPhoto'09 from the iLife'09 disk.
    3. Stared iLife'09 with the option key pressed and selected the iPhoto'04 library. Happy days - it opened the iPhoto'04 Library just fine and updated all the information (albums, titles, etc.) as it should. The library icon in the Picture folder was no longer an actual folder (as it was with iPhoto 4), but was now the iPhoto icon.
    4. Used the iLife'11 disk to update iLife'09 back to iLife'11 on the MBP. After this was completed I used Software Update to get version 9.1.1 of the software loaded before using the program. Started version 9.1.1 with the option key and selected the iPhoto'04 library that had been updated with iPhoto'09 and it was correctly updated to iPhoto'11 format with all the information intact.
    5. Problem resolved after getting helpful suggestions throughout the forum. While this process did not answer the problem about iLife'11 not being able to open the old iPhoto'04 library, the final solution worked just fine. I'll also be buying iPhoto Library Manger to help keep things in order, since I now have a library for the iPhoto'09 data that was updated and the second library for the iPhoto'04 library that was updated (there is also a 3rd library I'll bring in from my wife's MacBook).
    TD - thanks for you time and for helping to narrow down the possible issues for this problem.

  • Beginner - class & main method question

    Hello, I am still really new to OOP and Java. I came across an example in the book I am using that threw me for a loop.
    ex.
    class MyClass {
    public static void main(String [] args) {
    int x = 42;
    MyClass y = new MyClass();
    int z = y.go(x);
    int go(int arg) {
    arg = arg * 2;
    return arg;
    what I am confused about is the creation of a new class that contains the main method (MyClass y = new MyClass()), wouldn't this create a new class that also has a main method? Or is this the kind of code I will never encounter outside an example in a book and shouldn't worry about it :-)
    Thanks

    Since the main method is static, it would be invoked through MyClass.main(...). Note that this is not actually creating an object, just calling a static method.
    Creating an object is an entirely different story. MyClass mc = new MyClass(); instantiates a new object of the class MyClass. You couldn't do mc.main(...) because main is static. You can call things such as mc's go() method because they are not static and thus belong to objects of that class, rather than the class itself.
    ...Or something. That all made sense in my head, but if it didn't make sense to you just tell me.

  • Recommend project management calendar tools that integrate with SharePoint

    Hi All,
    Has anyone integrated SharePoint with project management tools like Trello or DivvyHQ.  We built out a task management system in SharePoint, and would like to integrate it with an out-of-the-box project planning tool so marketers can take advantage
    of calendars with multiple dates, ghantt charts, etc.  I'm looking for something out-of-the box that already has an integration with SharePoint.
    Thanks,
    -Jamie

    Hi,
    you can user project server
    or if nor possible check the following
    http://sp2010teamplates.codeplex.com/
    http://www.brightwork.com/resources/free_sharepoint_project_management_template.asp?event=4
    https://pinpoint.microsoft.com/en-kw/Applications/12884943482
    Kind Regards,
    John Naguib
    Senior Consultant
    John Naguib Blog
    John Naguib Twitter
    Please remember to mark this as answered if it helped you

  • [svn:osmf:] 14538: Adding missing class to syndication library.

    Revision: 14538
    Revision: 14538
    Author:   [email protected]
    Date:     2010-03-02 15:53:21 -0800 (Tue, 02 Mar 2010)
    Log Message:
    Adding missing class to syndication library.
    Added Paths:
        osmf/trunk/libs/Syndication/org/osmf/syndication/model/extensions/mrss/MediaRSSEmbed.as

    Can anyone suggest on how to add an external Jar file to an OAF project while development and also while deploying.
    Thanks Kris

  • Adding music files to iDVD project

    Hello All,
    Sorry if this has been asked before... I didn't seem to find anything in my "search" of past posts...
    A friend of mine recently passed away & I am (trying to) putting together a dvd to send to his brother that includes some home video of us ..... and I would like to include some music (files) from an old band he was in.... (he did a hme made cd)...
    I'd like his songs to be in a separate folder and be able to select from them with the menu (like Toast sets up a "music dvd)...
    All I have been able to figure to do is to include an iTunes playlist but that way one cannot jump from song to song... I even tried to do a seperate iMovie project with chapters for each song then export into iDVD & that (sort of) worked but I then couldn't figure out how to "combine" those "scenes" into my main project with the movies too...
    Now I am going the looong way around and saving out individual clips of each song as full quality dv and then will try to add them into a folder in my main project....
    My short question to all this long wind is:
    is there a way to create a "slide show" of individual music files the same way that slide show of photos works... so that you can move around between them with the menu.... all I have found is that a play list can be added into the sound "well" but then you cna't skip from song to song like you can with a what Toast does when it sets up a music dvd
    any ideas?
    thanks & regards to all for a great holiday
    from the coast of Maine
    -Larry

    Well...I'm not sure if my suggestion or ideas will help, but you could certainly use iMovie to organize and edit the movie portion of your DVD, then for the music portion, first add your songs to iTunes, then go back to your iMovie project, select the songs you want to add to your DVD project, and drag each song into the timeline. Now, you can add chapter markers at the beginning of each song. This might not give you a separate folder to open (folders are for data DVDs), but at least your audience will be able to see each song title and skip through the songs as neededce they are chapters. Other than this, you might want to wander over to the Toast discussion forum on the Roxio.com site where users of Toast may have a suggestion. With Toast, you might be able to drag your video and audio portions of your project into Toast separately, that way you only have two chapters: Video and Audio.

  • How to add a class in a project?

    Hello!
    i'm a beginner in developing and i don't know how to add a class in a project in Sun Java Wireless toolkit 2.5.2...
    The name of my project is essai2 and i already put a class, LogoMIDlet and now i want to put my new class ComBasique, how can i do that?
    and do you know if there is a program for bluetooth in order to connect my Nokia 6680 to another device that have a bluetooth?
    thanks a lot for your answer!
    Sophie

    how to change the class name after the project is created.In NetBeans, right click the class name either in the declaration or constructor, select Refactor --> Rename... and follow the dialog.
    You can refactor --> rename anything that is not in a guarded block. For those, there are options via the properties window.
    db

  • [svn:bz-trunk] 21285: Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project

    Revision: 21285
    Revision: 21285
    Author:   [email protected]
    Date:     2011-05-20 07:53:23 -0700 (Fri, 20 May 2011)
    Log Message:
    Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project
    Modified Paths:
        blazeds/trunk/apps/ds-console/console/ConsoleManager.as

    Revision: 21285
    Revision: 21285
    Author:   [email protected]
    Date:     2011-05-20 07:53:23 -0700 (Fri, 20 May 2011)
    Log Message:
    Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project
    Modified Paths:
        blazeds/trunk/apps/ds-console/console/ConsoleManager.as

  • How to share common classes across multiple projects in Jdeveloper?

    Hi Experts,
    I have a basic question.
    I am using Jdeveloper 11g and have divided my application into 2 projects (Model(ejb's) and Viewcontroller(jsf+managed beans etc)).
    The model project has a stateless session bean(named VisitingScholarBean) which uses a java bean class(named VisitingScholarDetails) defined in the ViewController project.
    The relevant Method in the stateless session bean is public void saveVSDetails(VisitingScholarDetails vsDetails).
    Now the issue is that the VisitingScholarDetails class is part of only the ViewController project but is being used in the Model project.
    So when I try to run the application it gives an error saying that
    weblogic.application.ModuleException: Exception preparing module: EJBModule(VisitingScholar-Model-ejb)
    [EJB:011023]An error occurred while reading the deployment descriptor. The error was:
    edu/nyu/ecoms/oaa/vs/web/backing/VisitingScholarDetails.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
         Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: edu.nyu.ecoms.oaa.vs.web.backing.VisitingScholarDetails
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)I cannot replicate the same VisitingScholarDetails class in both projects as it will lead to duplication.
    Please let me know how to include the VisitingScholarDetails class in the ejb-jar without replicating it in the Model and View Controller projects.
    Thanks for your time and help.
    Edited by: user10376431 on Jan 24, 2010 6:25 AM

    Welcome User in OTN,
    to make two projects can access its classes you should goto the project property ---> Dependencies then add the other project.
    in your case:
    try to goto you Model project property ----> Dependencies ---> Edit Dependencies .
    you will find your ViewController project. Expand it thin check to Build Output.
    you can make this for ViewContoller project also as:
    goto you ViewContoller project property ----> Dependencies ---> Edit Dependencies .
    you will find your Model project. Expand it thin check to Build Output.
    Sameh Nassar

  • Recently I tried adding disc menu to my project and an error occurs and system shuts down using pre9

    Recently I tried adding disc menu to my project and an error occurs and system shuts down using pre elements 9 on mac how can this be repaired

    From the Premiere Elements Information FAQ http://forums.adobe.com/thread/1042180
    •What version of Premiere Elements? Include the minor version number (e.g., Premiere Elements 9 with the 9.0.1 update).
    •What operating system? This should include specific minor version numbers, like "Mac OSX v10.6.8"---not just "Mac".
    •Have you installed any recent program or OS updates? (If not, you should. They fix a lot of problems.)
    •What kind(s) of image file(s)? When talking about camera raw files, include the model of camera.
    •If you are getting error message(s), what is the full text of the error message(s)?
    •What were you doing when the problem occurred?
    •What other software are you running?
    •Tell us about your computer hardware. How much RAM is installed?  How much free space is on your system (C:) drive?
    •Has this ever worked before?  If so, do you recall any changes you made to Premiere Elements, such as adding Plug-ins, brushes, etc.?  Did you make any changes to your system, such as updating hardware, printers or drivers; or installing/uninstalling any programs?
    And some other questions...
    •What are you editing, and does your video have a red line over it BEFORE you do any work?
    •Have you viewed the tutorial links at http://forums.adobe.com/thread/1275830 page?
    •Which version of Quicktime do you have installed?

  • How to add ANY class to my project?

    Greetings.
    I am begining my adventure with java. Now I am wasting 2 days because i can't add class to my program. I would like to use floating-point numbers so I've found MathFP.class on the Internet. But I've no idea how to
    link this class with my program. I've experimented a lot and found the midpapi20.jar archive in J2ME_SDK\PC_Emulation\WTK2\lib folder. I added the MathFP.class there. Now my program is compiling. But when I am running it, I get Such error:
    java.lang.NoClassDefFoundError: net/jscience/math/MathFP
         at SimpleGameCanvas.SmoothNoise(+3)
         at SimpleGameCanvas.<init>(+142)
         at RGBToImage2.startApp(+15)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)What am I doing wrong? Why adding simple class is so damn hard? :(
    Best regards and thanks for Your time.

    I found an answer in another topic here.
    add your jar to verified/lib folder and it should work. What a god damn waste of time to look for a solution for problems like this...

  • Help in adding SessionBean class

    Hi,
    I'm having a hard time adding the class path for the SessionBean class. Do you guys know where this class is?
    Thanks

    Look for j2ee.jar (the class is javax.ejb.SessionBean)

  • [svn] 1376: eclipse projects: added a flex-flextasks Java project

    Revision: 1376
    Author: [email protected]
    Date: 2008-04-23 17:22:58 -0700 (Wed, 23 Apr 2008)
    Log Message:
    eclipse projects: added a flex-flextasks Java project
    * If you are going to work on flex-flextasks, you need an additional Classpath variable: ANT17_JAR which should point to an appropriate ant.jar on your system (since we don't keep an ant.jar checked into lib).
    Modified Paths:
    flex/sdk/trunk/development/eclipse/readme.txt
    Added Paths:
    flex/sdk/trunk/development/eclipse/java/flex-flextasks/
    flex/sdk/trunk/development/eclipse/java/flex-flextasks/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-flextasks/.project

    Hi Yair
    It appears that WLS only supports mapping a directory to a jar in APP-INF/lib/
    C\:/runtime-New_configuration/Common/bin = APP-INF/lib/Common.jar
    but NOT to a jar in WEB-INF/lib.
    Engineering will look into it sometime to fix it.
    Workaround Suggested:
    As a workaround, you can include the Java/Utility project as part of the EAR and set as dependent J2EE module to the Web project.
    Hope this helps.
    Vimala-

Maybe you are looking for

  • ODBC not working in Reports 6i.

    I can not connect to any ODBC database via Reports 6i. When asked for username etc, I put in mnewman/mnn4578@ODBC:*, I get the DSN selection dialog, I switch to the machine tab, and select the odbc source I want, the system then responds with REP-050

  • UpdateNativeDir Utility

    When we have a user move from one OU to another, we are told that this UpdateNativeDir utility fixes the problem. 1. Does this utility only update the Shared Services relational database? 2. Are there other steps required to update security for users

  • Photoshop CS6 freezes when closing files

    Photoshop CS6 running on Windows XP SP3. It freezes for 3:51 minutes when we close an image that we have switched to grayscale. After some troubleshotting I discovered that the WebClient service would try to make an HTTP connection with our main file

  • Conditional Build Tag Color

    I want to change the color of the conditional build tag that I use for blocks of text within a topic. RH is forcing me to make the same change in each topic using the CBT. Is there any way to change the CBT color for all topics at once? I'm using RH

  • ITunes Store not updating my podcast feed

    Feedburner is updating my feed but it is not registering in iTunes or Stitcher. Any ideas why? http://feeds.feedburner.com/unbelievablepodcast