Results 1 to 6 of 6

Thread: DebugGraphics class of java

  1. #1
    Join Date
    Dec 2009
    Posts
    48

    DebugGraphics class of java

    Hello Guys,

    I need your help to know about the DebugGraphics class of java. There are some inbuilt classes of java which are very complicated and rarely used. I think DebugGraphics class id one them. I am not able to understand the exact use of DebugGraphics class of java. If anyone have sound knowledge about the this DebugGraphics class of java, then please let know it. I would really appreciate your any help over DebugGraphics class.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: DebugGraphics class of java

    Hi friend,

    A DebugGraphics class of java is taken from the 'java.awt.Graphics' package. This java class extends 'Graphics' interface of java. A 'java.awt.Graphics' package of java is also the sub-package of 'java.lang.Object'. A DebugGraphics class support various fields such as NONE_OPTION , BUFFERED_OPTION, LOG_OPTION, FLASH_OPTION. There are total three constructors of this java inbuilt class.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: DebugGraphics class of java

    Please go through the following example of DebugGraphics class of java:
    Code:
    import javax.swing.DebugGraphics;
    
    public class DebugGraphicsDM {
    
      public static void main(String[] am) {
    
        JFrame frame1 = new JFrame();
        frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
        JButton bn1 = new JButton();
    
        RepaintManager repaintManager = RepaintManager.currentManager(bn);
        repaintManager.setDoubleBufferingEnabled(false);
    
        bn.setDebugGraphicsOptions(DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION
            | DebugGraphics.LOG_OPTION);
    
        frame1.add(bn1);
    
        frame1.setSize(400, 300);
        frame1.setVisible(true);
    
        frame1.add(bn);
      }
    
    }

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Re: DebugGraphics class of java

    Hi friend,

    Please review following some methods of DebugGraphics class:
    • setXORMode(Color aClr)
    • setLogStream(PrintStream strm)
    • setFlashTime(int flashTm)
    • setFlashCount(int flashCnt)
    • setFlashColor(Color flashClr)

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521

    Re: DebugGraphics class of java

    Hi,

    I suggest you to study following example of 'DebugGraphics class'. I which I have used 'BUFFERED_OPTION' property of DebugGraphics class:
    Code:
    import javax.swing.DebugGraphics;
    import javax.swing.RepaintManager;
    public class GPHMain 
    {
      public static void main(String[] aln) {
        JFrame FN = new JFrame();
        FN.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
        JButton CJ = new JButton();
    
        RepaintManager XN = RepaintManager.currentManager(CJ);
        XN.setDoubleBufferingEnabled(false);
    
        CJ.setDebugGraphicsOptions(DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION
            | DebugGraphics.LOG_OPTION);
    
        FN.add(CJ);
    
        FN.setSize(300, 300);
        FN.setVisible(true);
    
        FN.add(CJ);
      }
    }

  6. #6
    Join Date
    Apr 2008
    Posts
    1,948

    Re: DebugGraphics class of java

    Conductors of DebugGraphics class of java:
    1. DebugGraphics(Graphics grphs, JComponent cmpnt)
    2. DebugGraphics(Graphics grphcs)
    3. DebugGraphics()
    4. draw3DRect(int x1, int y1, int width, int height, boolean bl)
    5. create(int x1, int y1, int width, int height)

Similar Threads

  1. Converting java class to java bean class
    By Ucchal in forum Software Development
    Replies: 6
    Last Post: 09-08-2010, 10:24 AM
  2. KeyboardFocusManager class of java
    By Gokul20 in forum Software Development
    Replies: 4
    Last Post: 05-03-2010, 03:38 PM
  3. JDesktopPane class of java
    By Sonam Goenka in forum Software Development
    Replies: 5
    Last Post: 18-02-2010, 08:14 AM
  4. What is TransferSupport Class in Java?
    By DANIEL 602 in forum Software Development
    Replies: 4
    Last Post: 13-02-2010, 06:54 AM
  5. Java Programming Language Basics: Reflection Basics and Class Class
    By mayuri_gunjan in forum Guides & Tutorials
    Replies: 6
    Last Post: 29-08-2005, 12:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,891,060.40926 seconds with 16 queries