Method Graphics not entered, why?

Why the method Graphics(Graphics g) is not beeing entered?
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SwingApplication extends JFrame
     public SwingApplication()
          super("SwingApplication");
          Component contents = this.createComponents();
          getContentPane().add(contents, BorderLayout.CENTER);
          pack();
          setVisible(true);
     public Component createComponents()
          JPanel pane = new JPanel();
          pane.setBorder(BorderFactory.createEmptyBorder(400, 600, 0,0));
          pane.setBackground(Color.YELLOW);
          pane.setLayout(new GridLayout(0, 1));
          return pane;
     public void Graphics(Graphics g)
          System.exit(0);
     public static void main(String[] args)
          new SwingApplication();
}

Why would it be? You never call the method, I think you mean to override paint. Change:
public void Graphics(Graphics g)to:
public void paint(Graphics g)That should be what you meant. Also, you shouldn't name your method Graphics, it's a class in the java.awt.

Similar Messages

  • Invalidate method is not working, why ?

    Hi, I have a search view. where I execute 3 RFC, each rfc node is in a different view with a back to search button.
    My problem is that in only one of this view if I make a search where that brings no data. It appears the data of the earlier search.
    The seatch button action contains this:
              wdContext.currentZtableCcElement().setClientid(l_client);
              wdContext.currentZtableCcElement().setSociedad(l_combo);
              wdThis.wdGetMultiCcCustController().executeZtrae_Cc_Input();
              wdContext.nodeOutput_Cc().invalidate();
              wdContext.currentZtablePagosElement().setClientid(l_client);
              wdContext.currentZtablePagosElement().setSociedad(l_combo);
              wdThis.wdGetMultiCcCustController().executeZtrae_Pagos_Input();
                    wdContext.nodeOutput_Pagos().invalidate();
              wdContext.currentZtableHistElement().setClientid(l_client);
              wdContext.currentZtableHistElement().setSociedad(l_combo);
              wdThis.wdGetMultiCcCustController().executeZtrae_Hist_Input();
                 wdContext.nodeOutput_Hist().invalidate();          
              wdThis.wdFirePlugToReportCc();
    How can the invalidate() method works in the first and third node, but not in the second one ???
    If the new search have some data works fine, but if there is no data, it shows the earlier search.
    some ideas ? thx

    Try this method:
    public void EmptyNode( com.sap.tc.webdynpro.progmodel.api.IWDNode node )
        //@@begin EmptyNode()
         while (!node.isEmpty())
              node.removeElement(node.getElementAt(0));
        //@@end
    Regards,
    Gianluca Barile

  • Please do not enter data for payment method Cheque papel error in IT0009

    Hi Experts,
    Whenever i try to  maintain bank details infotype for payment type C(Check Papel),the  system is throwing error "Please do not enter data for payment method Cheque papel". As per SAP std, I had deleted the entries for bank key, bank account and bank control key and maintained IBAN field in IT0009.While saving i am getting the error""Please do not enter data for payment method Cheque papel" and I couldn't save the record.
    Then i  deleted the entries for bank key, bank account and bank control key and IBAN field also in IT0009. While saving i am getting the error "Fill in all required entry fields". System behaves  as if Iban a required field in IT0009. Our bank details infotype is country specific.We made it country
    specific through feature P0009 and setting in table T588M.As per our conf setting IBAN field is optional. Even though IBAN field is optional, this field behaves  as that of a mandatory field in IT0009.Iam  facing this issues only for a few countries like Spain,Italy etc.For other counties i am able to change of create Bank details record  for payment type C.
    I have checked in Payment Methods by Country in FBZP (Payment Method Classification is set to Check and BANK DETAILS box is unchecked) but still no solution. Do i need to check in any other setting.
    Please shed some light on this issue.Thanks in Advance.

    Hi Jobish,
    It's weird but I tried the below method and it works
    Here's what you can try in case you do not want to enter the bank details for payment method 'C'..
    Tcode FBZP - > payment methods by country - > select payment method as 'C' and make below changes (make a note of these changes as you will have to undo them after saving the table):
    a. Payment method by classification - select bank transfer
    b. Reqd master record specifications - check the bank details options and select the options which you want to be entered (a/c no required, IBAN rqd, SWIFT code rqd)
    Save the table.
    PA30- > Edit any record once again and save it.
    Again go to FBZP and undo the above changes, i.e, revert to the original entries and again save the table.
    Try editing the record now in PA30 and it allows to save. This is the second weird workaround that I have come across and still not sure why
    After above workaround, I didn't get any error while maintaining the record, for this or any pernr.
    See if it works.
    Regards
    Neha

  • HT204266 I was trying to buy an app from the apple store, it asked for confirmation , when I re-entered my credit card details, got the message that your payment method is not valid!!!! How can I fix this problem?

    I was trying to buy an app from the apple store, it asked for confirmation , when I re-entered my credit card details, got the message that your payment method is not valid!!!! How can I fix this problem?

    Is this a pre-paid card thing? Or different billing address than your iTS account?

  • Hotmail: my password is listed in the tools box, but is not entered when logging on so I have to type it in every time. all other passwords are automatically entered. why not hotmail?

    Windows Live Hotmail: every time I log on to this site for my emails, I have to manually type in my password, instead of Firefox automatically doing it.The tools box for saved passwords shows the right password in the list of saved passwords, so why is this particular password not entered automatically? All other saved passwords are entered automatically in the appropriate website logins. Puzzling!

    Are you referring to the SAME computer/login?
    If not, he likely has auto-complete (or similar) enabled and you probably do not.

  • My Mastercard was working effectively, suddenly it stopped !  it says my payment method is not accepted ! why  I have money in my card but still cann't use it

    My Mastercard was working effectively, suddenly it stopped !
    it says my payment method is not accepted ! why
    I have money in my card but still cann't use it

    If it is a debit card, that may be your problem as Apple has
    stopped accepting debit cards in many areas.
    Click the link below to see current policy re accepted forms of payment:
    http://support.apple.com/kb/HT5552

  • Why can I not enter to my iTunes

    Why. Can in not enter iTunes

    Just what do you mean?
    If you can't connect to the iTunes store:
    Can't connect to the iTunes Store

  • I have a question, why is it I can't purchase a app at App Store it says "Your payment method is not valid in this store" and I've got a Visa card and my location is in the Philippines. Please help me, what can I do?

    I have a question, why is it I can't purchase a app at App Store it says "Your payment method is not valid in this store" and I've got a Visa card and my location is in the Philippines. Please help me, what can I do?

    Your visa card is a credit card, not debit card?  Do you meet the requirements as below, interpreted strictly?
    Philippines - http://www.apple.com/legal/itunes/ph/terms.html - "The iTunes Store, Mac App Store, App Store, and iBookstore services (the "Stores") accept credit cards issued by banks in the Philippines or Content Codes as forms of payment."

  • Why is the giving me this error (method does not return a value) PLEASE !!

    I have this code and it is giving me this error and I don't know how to fix it
    can anyone out there tell me why
    I have included the next line of code as I have had problems in the curly brackets in the past.
    The error is
    "Client.java": Error #: 466 : method does not return a value at line 941, column 3
    Please help
    THX TO ALL
    private Date DOBFormat()
        try
          if
            (MonthjComboBox.getSelectedItem().equals("") || 
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
          else
            String dateString = StringFromDateFields();
            SimpleDateFormat df = new SimpleDateFormat("dd/mm/yyyy");
            Date d = df.parse(StringFromDateFields());
            System.out.println("date="+d);
            return d;
        catch (ParseException pe)
          String d= System.getProperty("line.separator");
          JOptionPane.showMessageDialog( this,
           "Date format needs to be DD/MM/YYYY,"+ d +
           "You have enterd: "+ StringFromDateFields()   + d +
           "Please change the Date", "Date Format Error",
           JOptionPane.WARNING_MESSAGE);
          return  null;
      //File | Exit action performed
    public void jMenuFileExit_actionPerformed(ActionEvent e) {
      System.exit(0);
      }

    Fixed it needed to have a return null;
    this is the code
    if
            (MonthjComboBox.getSelectedItem().equals("") ||
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
            return null;

  • Why addcomponent and removecomponent method are not in component class,

    Hi,
    why addcomponent and removecomponent method are not in component oand component class,
    Thank you

    java.awt.Container has the appropriate add and remove methods:
    http://java.sun.com/javase/6/docs/api/java/awt/Container.html
    If that seems odd to you, you need to think about the Composite Pattern:
    http://en.wikipedia.org/wiki/Composite_pattern
    [url #" style="display: block; background-image: url('http://upload.wikimedia.org/wikipedia/en/1/13/Compositepattern.png'); width: 406px; height: 271px] 

  • Why not enter the Flash Media Playback setup website?

    Why not enter the Flash Media Playback setup website?
    My Live & Vod Flash Service can't run.
    Is Flash Media Playback termination of services?

    How to access the page ??
    Flash Media Playback Setup page
    To copy the embed code, visit the Flash Media Playback Setup page at osmf.org/configurator/fmp/. The Flash Media Playback Setup page (see Figure 2) contains two main sections on the left and the right. Use the form on the left to enter the values for your video: video source location and various custom settings. The right side of the page contains a preview player and the preview embed code. Enter the values and then click Preview to generate the proper embed code.
    I tried the above link and it takes me to the blogs.adobe.com .
    Pls advice

  • In va02 tocde after entering the data only storage location field is not saving.why?

    Hai
    in va02 tcode after entering the data only storage location field is not saving. why?

    Hi Purnaiah,
    Are you using any user exit for this or not?
    Check for the below exit, this may be the place where you can implement your code for saving the value.
    SAP MV45AFZZ calling the user exit with a form USEREXIT_SAVE_DOCUMENT
    Regards,
    Rafi

  • Why my iphone screen can not open the key and can not enter the menu

    why my iphone screen can not open the key and can not enter the menu

    Your issue is not clear - are you saying your phone is disabled and/or you forgot the passcode?
    http://support.apple.com/kb/ht1212

  • Why global var can be initialized with a static method and not by other static global var declared after its usage

    Take this:
    class test
    static int i=j;
    static int j=10;
    this will give illegal forward reference ....
    but this will compile successfully ..
    class test
    static int i=test1();
    static test1()
    return 20;
    plz assume we have main method in both cases ..
    java would be loading all static members first and would be assigning default values .. and then will be running all the initializers from to bottom ..
    Why second case is a compile success and not first .. as in second also test1 method is declared after its usage ..
    Plz help.
    Thanks
    Abhishek Roshan

    Why second case is a compile success and not first .. as in second also test1 method is declared after its usage ..
    Because the implementors of Java intentionally chose to do it that way.
    There are TWO stages to the process: preparation (which occurs first) and initialization.
    See the Java Language Spec section 12.4.1 'When Initialization Occurs
    The intent is that a class or interface type has a set of initializers that put it in a consistent state, and that this state is the first state that is observed by other classes. The static initializers and class variable initializers are executed in textual order, and may not refer to class variables declared in the class whose declarations appear textually after the use, even though these class variables are in scope (§8.3.2.3). This restriction is designed to detect, at compile time, most circular or otherwise malformed initializations.
    Note the clause beginning 'may not refer to class variables'. And the authors give the reason for that restriction in the last sentence: detect circular initializations.
    Then if you check that referenced section 8.3.2.3 you will find this
    http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.3.2.3
    8.3.2.3. Restrictions on the use of Fields during Initialization
    The declaration of a member needs to appear textually before it is used only if the member is an instance (respectively static) field of a class or interface C and all of the following conditions hold:
      The usage occurs in an instance (respectively static) variable initializer of C or in an instance (respectively static) initializer of C.
      The usage is not on the left hand side of an assignment.
      The usage is via a simple name.
      C is the innermost class or interface enclosing the usage.
    When a method is used (your example 2) no circular initialization can occur because methods are not 'initialized'.

  • Hello, I have problems with app store Your payment method is not valid in this Store. Please enter a new payment method. Could you help me, please?

    I have tried 3 cards already but still the same problem with app store Your payment method is not valid in this Store. Please enter a new payment method.
    Is there any ways to solve the issue?
    Thank you in advance for your help!

    If you still have problem, contact iTune Support
    https://ssl.apple.com/emea/support/itunes/contact.html

Maybe you are looking for