Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 27-02-2010
Member
 
Join Date: Jan 2010
Posts: 99
Confused with GraphicsDevice class of java

Hello friends,

I am IT student and studying java programming since one months. I have do one java project , I which will need to use the GraphicsDevice class of java. Because of that I need to be aware about the working of GraphicsDevice class java along with it's constructors and methods. I you posses any details about the GraphicsDevice class of java, then please let me aware about that. I am waiting for your reply.
Reply With Quote
  #2  
Old 27-02-2010
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: Confused with GraphicsDevice class of java

The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment. These include screen and printer devices. Note that there can be many screens and many printers in an instance of GraphicsEnvironment. Each graphics device has one or more GraphicsConfiguration objects associated with it. These objects specify the different configurations in which the GraphicsDevice can be used.
Reply With Quote
  #3  
Old 27-02-2010
Member
 
Join Date: May 2008
Posts: 2,008
Re: Confused with GraphicsDevice class of java

Hi,

Hopefully below example of GraphicsDevice class will solve your confusion about it:
Code:
import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;
import java.awt.image001.VolatileImage001;

public class GraphicsDeviceDM 
{
  public static void main(String[] ardgv) throws Exception {

    GraphicsEnvironment ge001 = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gsb = ge001.getScreenDevices();
    for (int ib = 0; ib < gsb.length; ib++) {
      VolatileImage001 imb = gs[ib].getDefaultConfiguration()
          .createCompatibleVolatileImage001(1, 1);
      int bytes = gsb[ib].getAvailableAcceleratedMemory();
      if (bytes < 0)
   {
        System.out.println("Amount of memory is unlimited");
      }
      im.flush();
    }
  }
}
Reply With Quote
  #4  
Old 27-02-2010
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Confused with GraphicsDevice class of java

I suggest you to study following methods of the GraphicsDevice class:
  • setFullScreenWindow(Window wnd)
  • setDisplayMode(DisplayMode dmd)
  • isFullScreenSupported()
  • getBestConfiguration(GraphicsConfigTemplate gctm)
  • getFullScreenWindow()
Reply With Quote
  #5  
Old 27-02-2010
Member
 
Join Date: May 2008
Posts: 2,293
Re: Confused with GraphicsDevice class of java

Hi friend,

If you want to know about the getIDstring() methods of GraphicsDevice class, then please review below java code:
Code:
import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;

public class GDClass 

{
  public static void main(String[] avgn) throws Exception

 {
    GraphicsEnvironment FN = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] screenDevices = N.getScreenDevices();
  
     for (int XF = 0; XF < screenDevices.length; XF++)
     System.out.println(screenDevices[XF].getIDstring());
  
      }

  }
Reply With Quote
  #6  
Old 27-02-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Confused with GraphicsDevice class of java

GraphicsDevice class of java programming is very essential for the description of the graphics devices. The GraphicsDevice class is basically taken from the 'java.lang.Object' class of java language. There is only one constructor is available with GraphicsDevice class. And this constructor is of type abstract, as it can't be directly instantiated. This class has ability to describe multiple graphics devices.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Confused with GraphicsDevice class of java"
Thread Thread Starter Forum Replies Last Post
Converting java class to java bean class Ucchal Software Development 6 09-08-2010 10:24 AM
Confused with JComponent class Owen Fernandes Software Development 5 18-02-2010 09:27 AM
Confused about JMenuItem class of java Sarfaraj Khan Software Development 5 16-02-2010 12:23 PM
Confused about JRootPane class of java Mithun Seth Software Development 5 15-02-2010 01:38 PM
Confused about PrintWriter class of Java ScarFace 01 Software Development 5 21-01-2010 09:09 AM


All times are GMT +5.5. The time now is 10:11 AM.