java.lang.Error: Unresolved compilation problem: i cannot be resolved to a variable

Coderanch | J Jacks | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    A few questions on the paint() method

    Coderanch | 5 years ago | J Jacks
    java.lang.Error: Unresolved compilation problem: i cannot be resolved to a variable

    Root Cause Analysis

    1. java.lang.Error

      Unresolved compilation problem: i cannot be resolved to a variable

      at JDemoFont.paint()
    2. Unknown
      JDemoFont.paint
      1. JDemoFont.paint(JDemoFont.java:13)
      1 frame
    3. Java RT
      RepaintArea.paint
      1. sun.awt.RepaintArea.paintComponent(RepaintArea.java:276)
      2. sun.awt.RepaintArea.paint(RepaintArea.java:241)
      2 frames
    4. apple.awt
      CWindow.handleEvent
      1. apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)
      2. apple.awt.CWindow.handleEvent(CWindow.java:545)
      2 frames
    5. Java RT
      EventDispatchThread.run
      1. java.awt.Component.dispatchEventImpl(Component.java:4811)
      2. java.awt.Container.dispatchEventImpl(Container.java:2143)
      3. java.awt.Window.dispatchEventImpl(Window.java:2478)
      4. java.awt.Component.dispatchEvent(Component.java:4565)
      5. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
      6. java.awt.EventQueue.access$000(EventQueue.java:85)
      7. java.awt.EventQueue$1.run(EventQueue.java:638)
      8. java.awt.EventQueue$1.run(EventQueue.java:636)
      9. java.security.AccessController.doPrivileged(Native Method)
      10. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      11. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
      12. java.awt.EventQueue$2.run(EventQueue.java:652)
      13. java.awt.EventQueue$2.run(EventQueue.java:650)
      14. java.security.AccessController.doPrivileged(Native Method)
      15. java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      16. java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
      17. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
      18. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
      19. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
      20. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
      21. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
      22. java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      22 frames