This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GraphicsConfiguration

 
Steven Zeng
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using the JFrame class ,I found there is a version of constructor with the argument of GraphicsConfiguration class, but the smaple code in the jdk doc failed to compile:
JFrame f = new JFrame(GraphicsConfiguration gc);
I am sure that I have import the java.awt.*.So I want to know how to use this class-GraphicsConfiguration.
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the code you pasted can't work as your argument is a declaration not a reference to GraphicsConfiguration.
try
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only time I have seen this constructor used is for systems with multiple displays... this forces the frame to open on a particular screen...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic