GraphicsEnvironment类能实例化吗?

猪之梦2022-10-04 11:39:541条回答

GraphicsEnvironment类能实例化吗?
GraphicsEnvironment g=GraphicsEnvironmeng.getLocalGraphicsEnvironmeng() 这句是什么意思?是实例化吗?

已提交,审核后显示!提交回复

共1条回复
执雨前行 共回答了16个问题 | 采纳率100%
获取运行时刻的图形环境.注意:运行期间不一定就有图形环境,譬如服务器操作系统就不一定要有图形环境
1年前

相关推荐

我画的这个圆为什么不动import java.awt.Color;import java.awt.Graphics;im
我画的这个圆为什么不动
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Panel;
public class GamePanel extends Panel{
private int x;
private int y;
private int zhijing;
public GamePanel(){
x=50;
y=50;
zhijing=100;
}
public void paint(Graphics g){
g.setColor(Color.BLUE);
g.fillOval(x,y,zhijing,zhijing);
}
public void gameLoop(){
while(true){
x++;
for(int i=1;i
xw0011年前1
真的喝高了 共回答了19个问题 | 采纳率84.2%
你在for1000循环里面repaint,怎么会动呢,程序动了,也会死的
java基础题,求解;(35)如果应用程序要在Applet上显示输出,则必须重写的方法是  A)Graphics.dra
java基础题,求解;
(35)如果应用程序要在Applet上显示输出,则必须重写的方法是
  A)Graphics.drawString()
  B)repaint()
  C)paint()
  D)update()
23、下列叙述中,正确的是( )。
A.Java语言的标识符是区分大小写的
B.源文件名与public类名可以不相同
C.源文件名其扩展名为.jar
D.源文件中public类的数目不限
24、类 Panel 默认的布局管理器是( )。
A.GridLayout B.BorderLayout C.FlowLayout D.GardLayout
25、关于以下程序代码的说明正确的是()
1. class HasStatic{
2.private static int x=100;
3.public static void main(String args[ ]){
4.HasStatic hs1=new HasStatic( );
5. hs1.x++;
6. HasStatic hs2=new HasStatic( );
7.hs2.x++;
8。hs1=new HasStatic( );
9. hs1.x++;
10. HasStatic.x- -;
11. System.out.println(“x=”+x);
12. }
13. }
A.5行不能通过编译,因为引用了私有静态变量
B.10行不能通过编译,因为x是私有静态变量
C. 程序通过编译,输出结果为:x=103
D.程序通过编译,输出结果为:x=102
二、程序填空题(共30分) (12)Java中的返回语句是 【12】 语句。
  (13)Java中,线程必须属于一个进程。线程是程序运行中的一个 【13】 。
  (14)线程由于调用sleep()方法进入阻塞状态,当睡眠结束时,该线程将进入 【14】 状态。
1、纯文本文件f1.txt中的内容是 abcd.
下面的程序将f1.txt文件中的内容写到f2.txt文件中 和屏幕上
import java.io.*;
public class filecopy{
public static void main(String[] args) {
try{
StringBuffer str=new StringBuffer();
FileInputStream fin=new FileInputStream("f1.txt");
FileOutputStream fout=new FileOutputStream("f2.txt");
int c;
while( ④ ) {

str.append((char)c); }
fin.close();
fout.close();
String str2=str.toString();
System.out.println(str2);
}catch(Exception c)
{System.out.println(c);}
}
}
三、程序阅读题(共20分)
1.阅读下面的程序代码,并回答问题
String s1=new String("abcde");
String s2=new String("abcde");
boolean b1=s1.equals(s2);
boolean b2=s1==s2;
System.out.print(b1+" "+b2);
(1)、程序段执行后,在命令行的输出结果如何?
(2)、解释输出(1)的结果的原因?
桃子19831年前1
orla 共回答了26个问题 | 采纳率92.3%
三、String s1=new String("abcde");
String s2=new String("abcde");
boolean b1=s1.equals(s2);
boolean b2=s1==s2;
System.out.print(b1+" "+b2);
输出true false
首先看String s1=new String("abcde");//给s1开辟一块地址 值为abcde
String s2=new String("abcde");//给s2开辟一块新地址abcde
用equals比较字符串是比较两者的值
用==比较是比较两者的地址&&也比较值。
英语翻译sorry,your system does not support 3D graphics,please ch
英语翻译
sorry,your system does not support 3D graphics,
please check your hardware and system configeration
then try again.
把解决方法及步骤发过来
dreamofboy1年前1
小尾巴牛 共回答了19个问题 | 采纳率78.9%
对不起,你的系统不支持3D图形,
请检查你的硬件构成和系统configeration
然后再试一次.
你是本来就不支持的还是突然出现的问题?
http://zhidao.baidu.com/q?word=%CF%B5%CD%B3%B2%BB%D6%A7%B3%D63D%CD%BC%D0%CE&lm=0&fr=search&ct=17&pn=0&tn=ikaslist&rn=10
自己找找
5条计算机英语选择题,求答案.What enable graphics, animation, sound, and v
5条计算机英语选择题,求答案.
What enable graphics, animation, sound, and video to be added to the Internet?
A.Web browser B. URL C. Web D. Sharewares
The Internet represents a _____
A.Physical network B. virtual network
What often resembles the electronic transaction of classified ads or an auction?
A.B2C B. C2C C. B2P D. B2B
Programs that automatically start and operate as a part of your browser are called_____
A.Plug-ins B. readers C. pop-up D. ActiveX Controls
Although basic application software programs may include multimedia features, users’ interaction with them is very limited because______.
A.They are accessed in a linear fashion.
B.Users don’t know about them.
C.They are not compatible with the program.
D.They cannot be accessed by the users directly.
chh51年前3
zhangxiatom 共回答了17个问题 | 采纳率88.2%
C B D A D
1.什么技术为互联网引入了图形、动画、音频、视频等多媒体资源?应该是Web.
2.互联网代表一个物理网络还是虚拟网络?应当是虚拟网络.
3.什么类型的电子商务通常容易采取类似网络广告或网络售卖信息的形式?可能是指B2C商户-客户型电子商务吧,这种形式下的推送式广告比较常见.
4.在启动浏览器时自动运行、通常视为浏览器一部分的程序称为?应当是插件.
5.虽然普通的应用软件程序也可以包含多媒体特性,但用户与这类程序的互动相对受限,这是因为?应当是说普通软件程序通常需要安装或不容易直接获取,不如Web内容易于访问、易于互动.
Caution!Extreme graphics,may be offensive!
weichuang6201年前2
blizzardgba 共回答了25个问题 | 采纳率88%
extreme:极端的,过激的
小心!有过于极端的画面,可能会令人不适!
public void draw( Graphics g) {
public void draw( Graphics g) {
Graphics2D g2d = (Graphics2D) g;
final int x = getX();
final int y = getY();
g2d.setColor( Color.GREEN );
g2d.setPaint( new GradientPaint( x,y,Color.GREEN,x + RADIUS/4,y + RADIUS/4,Color.BLACK,true) );
int xOffset = 0;
int yOffset = 0;
for( int i = 0; i < DENSITY; i++) {
xOffset = (int) (Math.random()*RADIUS);
yOffset = (int) (Math.random()*RADIUS);
g2d.draw( new Ellipse2D.Double( x + xOffset,y + yOffset,x + xOffset+3,y + yOffset+3) );
}
}
ww剑客风1年前1
xcp2000 共回答了16个问题 | 采纳率93.8%
public void draw( Graphics g) {
Graphics2D g2d = (Graphics2D) g;//转化g的类型为Graphics2D
final int x = getX()//;取得x坐标
final int y = getY();//取得y坐标
g2d.setColor( Color.GREEN );//设置填充色green
g2d.setPaint( new GradientPaint( x, y, Color.GREEN, x + RADIUS/4, y + RADIUS/4, Color.BLACK, true) );//设置填充方式,从点x,y到点x + RADIUS/4, y + RADIUS/4的颜色渐变从green到black
int xOffset = 0;//初始化x轴偏移变量
int yOffset = 0;//初始化y轴偏移变量
for( int i = 0; i < DENSITY; i++) {循环
xOffset = (int) (Math.random()*RADIUS);
yOffset = (int) (Math.random()*RADIUS);
g2d.draw( new Ellipse2D.Double( x + xOffset, y + yOffset, x + xOffset+3, y + yOffset+3) );//画一个椭圆
}
}
英语翻译6 .5 Integrating Text and GraphicsThe integration of tex
英语翻译
6 .5 Integrating Text and Graphics
The integration of text and graphics is probably the single most problematic issue in electronic publishing.Document processing systems take many different approaches to the problems involved.Some systems import the graphics into the document.Others point to external files.Others convert the graphics into an internal format.Some allow graphics editing; others do not.Invariably,each document processing system has its own level of understanding of the graphics formats it can use.The formats themselves impose restrictions on the ultimate flexibility possible.
ee失败者1年前2
烹燃心动 共回答了12个问题 | 采纳率100%
6.5 文本与图片的整合
文本与图片的整合可能是电子出版业中绝无仅有的棘手问题了.文档处理系统能对这些棘手的问题有许多解决之道.有些系统将图表转成文档;有些系统用于处理外文文档;有些系统将外文图表转成中文的版式;有些系统支持图表编辑,有些不支持.而不变地是每个文档处理系统都有其对图表版式的不同理解层面和各自的适用范围.这些格式的局限束缚了对其最终使用的灵活性.
JAVA编程练习设计矩形类Ractangle、椭圆形类Ellipse,该两类实现平面图形接口PlaneGraphics.
JAVA编程练习
设计矩形类Ractangle、椭圆形类Ellipse,该两类实现平面图形接口PlaneGraphics.
平面图形接口PlaneGraphics中声明三个抽象方法:
area() 求面积
perimeter() 求周长
print() 输出平面图形的类型(正方形、长方形、园、椭圆)、属性(如正方形输出边长,长方形输出长度与宽度,园输出半径,椭圆输出a轴半径与b轴半径)、面积、周长.
Jennycake1年前1
鱼峰啤酒 共回答了29个问题 | 采纳率96.6%
接口PlaneGraphics:public interface PlaneGraphics
{
public double area();

public double perimeter();

public String print();
}类Ractangle:
public class Ractangle implements PlaneGraphics
{
public double a;
public double b;

@Override
public double area()
{
// TODO Auto-generated method stub
return a * b;
}

@Override
public double perimeter()
{
// TODO Auto-generated method stub
return 2 * (a + b);
}

@Override
public String print()
{
// TODO Auto-generated method stub
return "类型:长方形;属性:长" + a + ",宽" + b + ";面积:" + area() + ";周长:"
+ perimeter();
}

}类Ellipse:public class Ellipse implements PlaneGraphics
{

public double a;
public double b;

@Override
public double area()
{
// TODO Auto-generated method stub
return Math.PI * a * b;
}

@Override
public double perimeter()
{
// TODO Auto-generated method stub
return 0;
}

@Override
public String print()
{
// TODO Auto-generated method stub
return "类型:椭圆;属性:a轴" + a + ",b轴" + b + ";面积:" + area() + ";周长:"
+ perimeter();
}

}正方形类:public class Square extends Ractangle
{
public int a;

@Override
public double area()
{
// TODO Auto-generated method stub
return a * a;
}

@Override
public double perimeter()
{
// TODO Auto-generated method stub
return 4 * a;
}

@Override
public String print()
{
// TODO Auto-generated method stub
return "类型:正方形;属性:边长" + a + ";面积:" + area() + ";周长:" + perimeter();
}

}圆形类:
public class Round extends Ellipse
{
public int r;

@Override
public double area()
{
// TODO Auto-generated method stub
return Math.PI * r * r;
}

@Override
public double perimeter()
{
// TODO Auto-generated method stub
return 2 * Math.PI * r;
}

@Override
public String print()
{
// TODO Auto-generated method stub
return "类型:圆;属性:半径" + a + ";面积:" + area() + ";周长:" + perimeter();
}

}
疯狂猜图 下面写了个 graphics 之类的,答案是三个英文字母
PiscesR1年前1
鱼哈哈鱼 共回答了19个问题 | 采纳率94.7%
ATI
couldn't intialize graphics engine
智能的确良1年前1
ouyan714 共回答了19个问题 | 采纳率89.5%
不能初始化图像引擎
英语翻译谁能帮我翻译下面这段话 CorelDRAW is a vector graphics editor develo
英语翻译
谁能帮我翻译下面这段话 CorelDRAW is a vector graphics editor developed and marketed by Corel Corporation of Ottawa,Canada.It is also the name of Corel's Graphics Suite.Its latest version,named X5 (actually version 15),was released in February 2010.或者给我个 CorelDRAW的中英简介 实在拿不出分了 有没好心人帮下忙
54stan1年前1
qazmlp1001 共回答了20个问题 | 采纳率90%
译文如下:CorelDRAW是一个矢量图形编辑加拿大渥太华公司开发的和销售的矢量图形编辑软件,这也是公司的图形标识,它是最新的版本,命名为X5(实际上为15版),是在2010年2月发布的.本人英文一般,大致也是这个意思吧.补充:这样译:CorelDRAW是一个由 加拿大 渥太华 公司开发的和销售的 矢量图形 编辑软件,这也是公司的图形标识,它是最新的版本,命名为X5(实际上为15版),是在2010年2月发布的.
疯狂猜图中底下有一排英文graphics GRAPHICS
月下推门1年前1
shi0526 共回答了17个问题 | 采纳率94.1%
ATI
不对请贴图
pcmark score:n/a cpu score:5587 memory score:3216 graphicsco
pcmark score:n/a cpu score:5587 memory score:3216 graphicscore score:2043 hdd score:4 496
这样的得分怎么样希望大虾们能帮忙分析一下
板荡英雄1年前1
lsz234 共回答了27个问题 | 采纳率96.3%
PhysX物理加速 对你的配置而言没有意义.只有在9800GT及以上的N卡,才能体现出效果,至少也得9600GT档次再考虑打开,因为如果显卡性能弱,即使处理图形都无法应付,哪有空余的运算能力去计算物理特效呢.
分数正常,如果在配置不变的情况下,想改进分数的话,只能考虑把CPU超频,而且就3DMARK06而言,CPU占的权重不比显卡少多少,所有也有人说3DMARK06其实就是CPU MARK06,有点夸张,但也有一定道理.
至于虚拟内存的设置改变,其实对性能的影响并不是非常大.windows的预留带宽是针对网络而言的,而且,实际上提出windows的预留带宽,在实际使用中,你并不能感受到有什么明显的效果.
英语里面geometry与graphics都有几何的意思,那么他俩的具体的区别,
shazy1年前1
发帖不用动手指 共回答了20个问题 | 采纳率95%
graphic代表用于说明、论证的图(或图片、图表等)graphics是图解学
而geometry就是代表数学里的几何学.
简单来说,graphic的存在是为了解释另一事物而geometry就是单纯数学上的学名.
英语翻译请问declarative graphics systems 怎么翻译,这应该是一个术语,就像object or
英语翻译
请问declarative graphics systems 怎么翻译,这应该是一个术语,就像object oriented 是面向对象一样.
huge0407471年前2
tt者 共回答了17个问题 | 采纳率88.2%
宣告式图形系统
http://66.102.7.99/search?hl=zh-CN&newwindow=1&q=%E5%AE%A3%E5%91%8A%E5%BC%8F%E5%9B%BE%E5%BD%A2%E7%B3%BB%E7%BB%9F&btnG=%E6%90%9C%E7%B4%A2&lr=
declarative programming 宣告式程式设计
Java中 如何使用java.awt.Graphics 来确定图形坐标?譬如:直线,三角系,椭圆,圆,矩形之类的图像,要
Java中 如何使用java.awt.Graphics 来确定图形坐标?譬如:直线,三角系,椭圆,圆,矩形之类的图像,要怎
可以举几个具体的例子 加以解析说明下吗?初学者的我
sibangzi1年前1
1起蛙鹅 共回答了25个问题 | 采纳率88%
一般而言,程序语言里面的2d图形都是用矩形框起来的,用矩形作为他的边界.比如直线它的区域就是以这条直线为对角线的矩形;圆区域就是以这个圆为内切圆的矩形区域.
所以通过他们的矩形区域来获得他们的区域.
java.awt.Graphics中有getClipBounds() 的函数,返回类型是 Rectang类型,它标明改图形的矩形区域.
你要获得直线两点的坐标的话,就是区域矩形的对角两点.要获得圆心的话,就是区域矩形的中心(这时候矩形是正方形了).其他大抵如此.
英语翻译翻译:reduce your graphics in actual size as much as you ca
英语翻译
翻译:reduce your graphics in actual size as much as you can without distorting the graphics or pictures
xingbiao001年前4
gordam 共回答了17个问题 | 采纳率82.4%
在不破坏图片或照片的前提下,尽可能的把你的图片缩小到实际大小.