Question from a noob

ok , so i want to ask
     class NewAction implements ActionListener
          public void actionPerformed(ActionEvent e)
          TArea2.setDocument(new PlainDocument());
     void confirmation()
     int ReturnValue=JOptionPane.showConfirmDialog(null,"Do you want to open a new file?    ","Confirmation  ", JOptionPane.YES_NO_CANCEL_OPTION  );
     if(ReturnValue==JOptionPane.YES_OPTION)
          //HOW CAN I POSSIBLY CALL THE METHOD IN THE NewAction class?? 
     else if(ReturnValue==JOptionPane.CANCEL_OPTION)
     }sorry for my newbie question but can we actually call the actionPerformed method inside the NewAction class from the confirmation method??

this.NewAction().actionPerformed();
myclass.NewAction.actionPeformed();
NewAction().actionPerformed();
NewAction.actionPerformed();Nobody of these makes any sense.
You would need to call
nact.actionPerformed(evt),
where nact is a NewAction object and evt is an ActionEvent object.
But this is bad design because the evt object doesn't have any meaning in the call. I suggest instead you write a method
public void doSomething() {
   TArea2.setDocument(new PlainDocument());
}and then you call this method in the actionPerformed() and in the if(ReturnValue==JOptionPane.YES_OPTION) block.

Similar Messages

  • Just a simple question from a noob

    Hey guys
    im just working on my website, im not doing anything complicated just simple stuff.
    I just want to add a @facefont and change /edit the rules to just let me change the font. I wish it were as easy as just changing it with the property inspector but ive come to figure out that it doesnt work that way. Every time ive asked this question ive been referred to websites that have a 4 page guide on fonts,but this rarely helps me. im just looking a direct on how to do this. BTW im working with a preloaded template from dreamtemplate so everything is already formatted.
    problems: whenever i try to change the font and save it nothing saves but the font size, i want to add @facefont and change the font
    thanks in advanced

    Using Custom Web fonts is a bit more complex than you realize. 
    http://alt-web.com/Articles/Custom-Web-Fonts.shtml
    To make things simple, I recommend using one of the Free Edge Web Fonts.  Simply copy & paste code into the <head> tags of your HTML page. 
    EXAMPLE:
    <!--Edge Font-->
    <script src="http://use.edgefonts.net/pt-sans-narrow:n4,n7:all;league-gothic:n4:all.js"></script>
    Then define the font in your CSS code:
    h2 {font-family:pt-sans-narrow, "Arial Narrow", sans-serif;}
    h3 {
    font-family: league-gothic, Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
    HTML code:
    <h2>This is Heading 2 - pt-sans-narrow</h2>
    <h3>This is Heading 3 - league-gothic</h3>
    Nancy O.

  • More questions from a noob (Volume 2)

    I started using Arch yesterday. I got most stuff set up already.
    Except:
    1. Sounds not working (No idea about sound stuff at all )
    2. Can't get OpenDNS working (Automatically overwrites any changes to /etc/resolv.conf)
    3. XChat says everything I type is misspelled
    4. Compiz gets rid of my window boarders (Using GNOME BTW)
    5. Need to run `sudo /sbin/dhcpcd eth0` every startup or internet doesn't work
    And more as they come.

    I'm a bit of a noob myself, but I'll try where I can:
    1.  All I did for sound was follow the ALSA section of the beginner's guide.  Have you already tried that? http://wiki.archlinux.org/index.php/Beg … igure_ALSA (This is less detailed but easier to follow (IMHO) than the main ALSA wiki page)
    2.  Sorry, can't help there.
    3.  I've hopped so many distros recently I don't recall if this was Arch or not, but at least one distro I tried was spell checking everything using German.  I'm not familiar with XCHAT at all, but if there's a way to configure what it uses to spell check, I think that's where you should be looking.
    4.  I made the mistake of starting to follow the wiki page for "Compiz", not "Compiz-Fusion". (because I'm so used to referring to it that way)  Could you have done the same?  I had the same problem as you when using straight Compiz.
    If you did, use "pacman -Qs compiz" to find out what compiz-related packages you installed.
    Then use "pacman -Rsn package_name" to remove those packages.  This will try to remove dependencies, and may throw an error on that part depending on what order you remove them in.  Don't worry about it.  If you hit every package that comes up with -Qs with the -Rsn command, they'll all be fully removed. 
    Use -Qs to double check when you are done.   
    Then try following http://wiki.archlinux.org/index.php/Compiz-Fusion.  I use fusion-icon to start it, you may want to do differently.  You may also have some bigger problem, but having done it myself I could see using the wrong wiki page as a common noob error.
    5.  I use wicd for both my wireless and wired connections, and it makes it pretty easy (and automatic).  I know there are other methods, but wicd worked with ease for me.  http://wiki.archlinux.org/index.php/Wicd
    I hope some of this is helpful for you!
    Last edited by arch_nemesis (2008-12-23 15:15:53)

  • Questions from a "noob"

    I am very new to Adobe CQ. I've been sifting through the scarce documentation and trying to come up to speed, but I've found it very difficult to find what I need. I think I'm at a point in which I understand (to a point) the overall architecture and how to do basic things (mostly theoretically).
    I have a few questions that I was hoping somebody could point me in the right direction on. I would really appreciate the jumpstart.
    - Is it possible to access page component properties? I am trying to create a generic component that can look at a page to see if it has a component embedded within it. If so, I want to iterate over the properties. I am using the page manager to get the page. Are the component properties included with the page properties of that page?
    - How can I make a component accessible to any page? I added a property to my template named allowedPaths (which is depracated?) and its value is /content(/.*)? That only allows the component to be visible to pages created at the root of my websites in the WCM.
    - How do you make a page's dialog actually save the entries you enter? I added a new cq:Panel (etc) to an existing dialog. I followed the same form that was there before. Basically there were 2 tabs and I added a new one, so there is now 3. I see my fields etc. When I enter in data and click "OK", my field data is not saved. It works for the pre-existing form fields, but not in the one I just added.
    I hope the above questions made sense. I'm having a hard time trying to find the information that I need to start feeling comfortable using CQ.
    Any help would be appreciated. Thanks in advance!

    Hi spaceling,
    Just as a general comment, it's a good idea to try to post a single question per thread. That helps with findability.
    1) page component properties - yes. <cq:defineObjects/> creates a scripting variables named currentPage and pageProperties. See http://dev.day.com/docs/en/cq/current/howto/taglib.html for a list of all the scripting variables this tag creates.
    2) which components are accessible on which pages is determined by the design settings. These settings are specific to each template. See http://dev.day.com/docs/en/cq/current/developing/components.html#Adding%20a%20new%20compon ent%20to%20the%20paragraph%20system%20%28design%20%20%20%20%20mode%29 for some instructions on doing this.
    3) my guess is that the fields you added don't have a proper name property. Are the name (which are the names under which the field values are POSTed all start with ./ ? See http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#M anipulatingContent-TheSlingPostServlet%28servlets.post%29-OmittingSomeParameters for why this is important and why if you don't have it, the fields don't get saved.
    HTH,
    Justin

  • My New Curve 8330! (few questions from a noob!)

    So I finally got the Curve 8330 - I had been waiting all this time for the Thunder but decided yesterday that if my fingers are too fat for an iPhone, then they will be for the Thunder as well. Anyways, I LOVE the Curve thus far...just a few questions.
    #1) Do the "messages" and "[email protected]" icon serve the same purpose? If so, which I think they do, how do I filter the "messages" icon so that ONLY my incoming SMS messages are shown??? As of now, the "messages" icon is cluttered with e-mail, SMS, bb mesanger & voicemail! I HATE THAT! I'd rather keep it clean and organized so that If i wanna view my SMS messages, I click on "messages" If I wanna view my bb messanger messages, I click on the bb messanger icon, If i wanna see my e-mails, I click on the "[email protected]" icon and so forth. Is there a way to filter it this way???
    #2) When I send an e-mail, I automatically get THAT e-mail sent back to me! How do I disable this function? I have no need to recieve in my INBOX the e-mail I just sent out.... I tried going into "Messages->options" and turning the "hide sent" to "ON" but this problem still occurs...... Any help on that?
    #3) I have this stupid "Facebook" icon in my menu, how do I delete this permanently?
    Thanks everyone, I'm sure i'll have more questions as I'm readin through! 

    Yes, when you go into your messages and hit the menu key and select options and general options. Email and sms messages should be set to separate. Hit the back key to the right of your trackball to save. If you do not see an icon now just for sms and mms, do a battery pull. Take the battery out with the phone on and leave it out for 30 seconds. Replace it and allow the phone 1-3 minutes to reboot does the icon appear now?
    ~Lorrie~ Master of All Things Blackberry!

  • 2 questions from a noob

    Привет
    Я пытаюсь установить арки.
    Она работает, но у меня есть проблема.
    Есть ли способ установить LILO на раздел paticular вместо MBR?
    Я только знаком с GRUB (и Gentoo процедуру установки, если на то пошло).
    Я установил арку раньше, и я могу себе это, но, я думаю, я действительно получил LILO на / dev/hda9 раз.
    А вообще такое возможно с аркой установки консоли?
    באשר לשאלה מס '2 ...
    האם יהיה זה אפשרי עבור קשת להתקין להגדיר שעון ה-BIOS שלי בחזרה 8 שעות?
    www.zimmerfinder.co.il/
    השעון שלי לא ממש משנה עכשיו, כשאני מתקין קשת.
    וזה קרה פעם אחת לפני זמן בערך באותה התקנתי קשת בפעם הראשונה.
    אני משוגע? האם ניתן להתקין את קונסולת ה-CMOS ערכי чане? לא הרס?
    לא CMOS אחרים ערכים שונה. לכן, זה יכול להיות צירוף מקרים מוזר.
    www.zimmerfinder.co.il/t/187-/
    בכל מקרה, קשת נראה о מסודר. ברגע גראב היא יציבה (0,6?) תצטרך להמיר חדש.
    Спасибо
    Last edited by marsel martin (2010-06-01 13:18:45)

    Welcome,
    the current default boot manager for arch is grub (0.97-17). I suggest you stick with it if you're familiar with it.
    As for your second issue, this will help you.
    Regards,
    demian

  • Quick question from a noob

    Reading the 2 Day Developer Guide it states that a table is a database object (fine). It also goes on to say that "every object in the database belongs to just one schema and has a unique name within that schema"
    Does this mean that if i create a table called; for example 'Staff'; that this cannot be used by any of my colleges in their applications? So we may end up with loads of tables all containing staff info that have to all be maintained separatley??
    Please tell me i'm wrong!

    Pretend that you create the STAFF table in schema COLLEGE by user COLLEGE. You can grant select, insert, delete, etc. on COLLEGE.STAFF to any user, i.e. you really only need one COLLEGE.STAFF table assuming that you want every college to use the same STAFF table.
    If each college needs its own STAFF table then you could create a schema for each college with an individual STAFF table in each schema, e.g. VCU.STAFF, WILLIAMANDMARY.STAFF, UVA.STAFF, etc. Without knowing your specific requirements I don't know which would work best for you.
    The bottom line is that you only need 1 STAFF table as long as the application can deal with it.

  • Why can't I post a question from my new system?

    Hello All:
    I was just trying to post a question from my new mbp but it wouldn't allow me to do anything.  It continually gave me a message highlighted in 'red' that i was;t allowed to modify or post anything.  I've been asking questions for quite a while and have never seen this.  I also happen to have my older bmp, also logged onto the 'Apple Discussions' site, open beside me.  Can anyone explain this to me please?  BTW, my new system obviously has Yosemite on it while my older bmp has Lion.  Thanks in advance, to all those who respond.
    Regards,
    Ciaochiao

    ChitlinsCC, I'm adding your reloaders to my article on how to make using ASC easier.
    Here is my ASC work flow...
    1) I login.
    2) Block the automatic 30 minute logout.
         Unless you do something every thirty minutes you get logged out.  The forum software waits to tell you this as long as it can to keep you in suspense  ;-) . Filling out a reply is the exception to the thirty minute window.
            Start an auto reloader.
    Safari = SafariTabReloader
    Firefox = ReloadEvery: "Reload web pages automatically"
    Others = Reloaders | Cerberus - Support Center
      You need to pick a page that will reload over time without stalling out. It's ASC.  I've found my profile display the best to use. I get my Profile page after some  logins.  It's ASC.  Change rccharles to your apple id.
    https://discussions.apple.com/people/rccharles?view=discussions
    Reply technique
    Open a new browser window.  Pick some discussion.  Open a reply window.  As long as this reply window is open, you will stay logged in.  The 30 minute times is reset as needed by the ASC software.
    3) I open another window to do my normal ASC browsing.
    4) I have a FireFox bookmark to goto the discussions that I have participated in. I've modified it to add on the content stuff.
             turingtest2 recommends. Change rccharles to your apple id:  
    https://discussions.apple.com/people/rccharles/content?filterID=participated~obj ecttype~objecttype%5Bthread%5D
    5) Use turingtest2's generated links with the /content suffix as browser bookmark to the ASC discussions: 
    Site map of Communities and Categories
    https://discussions.apple.com/docs/DOC-2463
    6) Adjust the ASC web page layout.
    For FireFox
    I run with Hiroto's modification to user content.  This is the only way these forums are readable for me.  How to adjust the format and layout of ASC Web Pages:
    https://discussions.apple.com/docs/DOC-7501
    For Safari
    "ASCPowerTools is a Safari Extension designed to give more control"
    http://www.etresoft.com/ascpowertools
    7) Read and answer my old posts.  I kind of memorize the time I last posted. ( It's way bad that apple eliminated the last poster to a thread. )
    8) I use tabbed browsering.  From a list of discussions, hold down the command key then click on the link. You get two tabs this way. The original window will keep where you have been.

  • HT201272 I have recently picked up an Apple TV. When I go to the movies tab, there are less movies available there than there are in my i-Tunes account. I've done some looking around at questions from others, but haven't found an answer that works for me.

    I have recently picked up an Apple TV. When I go to the movies tab, there less movies available there than what is available in my i-Tunes library. I have 38 movies showing in my library but only 23 are showing in the Movies tab on the Apple TV. After researching this a little, there are only 23 movies showing under Purchased in the Quicklinks of my i-Tunes account. The majority of my collection are digital copy downloads that came from DVD purchases. Some of the missing movies were added in the past couple of months, the rest are a year-or-so old. I have done some looking around at questions from others, but I have not found an answer that will fix my situation. How do I update my library to get ALL of my movies to reflect that they were "Purchased"(as it says they were in their Properties)?

    Biggles Lamb wrote:
    Chill out guys, getting personal will never ever change another persons view, right or wrong, they are entitled to them .
    The pros and cons of to CC or not to CC have been done to death
    Its a fact the CC model will work for some, especially newbies and small businesses.
    The risks associated with the CC model have been well documented.
    For long term users of CS perpetuals its generally a large hike up in cost compared to the upgrade system.
    Then there are the....... Adobe can rot it hell...... group who will never subscribe
    To each their own, you do the math to suit your cashflow whatever that is and then make an informed decision
    To those on the CC model, I'd like to offer some practical advice.........do not allow automatic updates.........make regular backups............develop an exit strategy of alternatives for when you can no longer afford the subscription costs............never ever assume that the Adobe update is bug free
    Enjoy your cloud
    Col
    Thank you for that post, and the advice. I just happen to be one of those who it does work for. I've been around long enough to know that CC isn't going to work for everyone(the large publishing/radio/web company I work for isn't upgrading to CC because of the costs involved). But it does for me as I potentially venture out into the full-time freelancing world and away from the more structured big office environment. I can't make decisions based on what is best for anyone else, or what will hurt or help Adobe. Just what affects me, and that's all.
    Brent

  • May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    Or you can actived the right button on your magic mouse and click on they icon in the dock. then you select "stop" and it's out of your dock.
    Greetings
    *update: Sorry, my mistake! I didn't read your message correct! Sorry for the inconvience!

  • TS2446 what do i do if i failed one of my security questions from forever ago from trying to buy a song after changing my password?

    I have been locked out and am unable to purchase anything. I just got a new laptop, and it asked me my security questions from forever ago. How do i fix this?

    Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities

  • Need recommend to build MB + CPU + VGA ....a question from Vietnam

    1st, sry my E is not good...
    My job is working with 60% Pr 40% Ae (full HD)
    I need recommend to help me choose 3 option
    CPU + MB (in VN they same price)
    1.   i7 950 + X58
    2.   i7 2600 + p8z68
    3.   2xE5520 + asus Z8NA (2nd)
    VGA (in VN they same price)
    1.   GTX 570
    2.   Nivida Quadro 1800 (because quadro 2000,3800,4800.. all supported is very difficult to buy it in VN) Quadro1800 can be GPU hacked ? (2nd)
    My PSU 750W
    RAM DDR3 Gskill buss 1333 4x4gb
    a question from Vietnam, need to help so much
    Thanks alot
    Waitting for Harm recommend

    I concur with Harm's recommendation. The Quadro 1800 is obsolete: It is based on the equally-obsolete GeForce 9600 GT but with only a 192-bit memory bus instead of a 256-bit memory bus. As such, the only memory configuration that was available on the Quadro 1800 was 768MB. Unfortunately, Premiere Pro CS5 requires a minimum of 765MB of free, unused graphics memory just to even enable GPU accelerated mode at all even with the hack. But since Windows itself eats up some of that 768MB, you'd be left with less than 750MB of free, unused graphics RAM with that Quadro 1800. As a result, Premiere Pro CS5 will be stuck in software-only mode even with the hack if you have the Quadro 1800 as the primary card.

  • HT5570 I do not remember the questions from my Apple ID to reset password

    I do not remember the questions from my Apple ID to reset password

    Hi Dima,
    If you are having issues with the Apple ID security questions, you may find the following articles helpful:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    Apple Support: Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/ht5312
    Regards,
    - Brenden

  • Security Questions from a Select List or Drop down Service Provider Edition

    Hello,
    Can we fetch security questions from the drop down or a select list in Service Provider Edition. We have a requirement to select multiple security questions during registration.
    Please advise.
    Regards
    Vinod

    HI
    Welcome to the Forum...
    You cannot put all the values in a single parameter field so you need to select each field for each parameter...
    Better you post it in this link for more reponses:
    Reporting and Printing

  • I cannot find my question from last night. I saw the instruction from jscher2000 but I find nothing like what he decribes.

    I cannot find my question from last night. I saw the instruction from jscher2000 but I find nothing like what he decribes. My question was "Firefox 22 worked on Windows 7 but 23 does not"

    hello MLP99, you can find your prior questions & answers under this link (once you're logged into support.mozilla.org with your account): https://support.mozilla.org/questions?filter=my-contributions

Maybe you are looking for

  • My iTunes won't open! Please help.

    My iTunes on my iPhone 4 will not stay open. When I click it, it shows up for like a second then goes away! I've tried restarting my phone, logging out of iTunes then logging back in but still the same happens! Pleaseeeee someone help me with this, I

  • Regarding STATUS FIELD INFORMATION OF T.CODE CO03(Display Production Order)

    Hello Friends, I want to know, how could i get the Status field information from T.CodeCO03(Display Production Order). Any F.M or Table Name. I have production order Number as input field and output will be Status. Regards Amit

  • Different weighting procedure for estimating reads and billing.

    Is there any way to use a weighting procedure for billing that's different from what's used in meter read estimation?  We'd like to bill with linear weighting but not for meter read estimation.

  • AIM PC to iChat MAC help please

    I am visiting my sister in N.C. She has a PC. I have a MAC. I brought my MAC with me. I can video chat MAC to MAC through her Earthlink Cable modem but cannot get her PC to chat with a MAC. I have read through most of the documents contained in the f

  • Unable to locate Documents To Go (DTG) after 4.5 upgrade

    I've just upgraded my desktop manager to V 5.0 and my 8700g to OS 4.5.0.75 (from carrier Orange UK), but I can't access DTG. I've read several similar forum problems and tried the solutions (ie downloading & updating the desktop software first; delet