用Java 设置的定位打印作业
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.OrientationRequested;
public class Main {
public static void main(String[] argv) throws Exception {
// Set up the attribute set
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(OrientationRequested.PORTRAIT);
// aset.add(OrientationRequested.LANDSCAPE);
}
}
相关文档:
举例子说明一切。
JAVA_HOME: C:\j2sdk1.4.2_13
Path: C:\j2sdk1.4.2_13\bin;
Classpath:.;JAVA_HOME\lib\tools.jar ; JAVA_HOME\lib\dt.jar;
&n ......
JCP SE/EE 执行委员会
正式接受了
JSR 330
—— Dependency Injection for Java。该规范于 今年 5 月 9 日
由 Google 的 Bob Lee 以及 SpringSource 的 Rod Johnson 作为规范领导提交给 JCP,现在已经正式发布,不得不感叹该规范标准化过程之快。在 最终投票结果中
,14 票通过,1 票未投,1 票反对。
J ......
转帖处:http://dong-java.javaeye.com/blog/375150
1。推荐使用Oralce比较新的10.2.0.3 JDBC Drivers。这个版本对比9.2的最大的好处是DriverManager.setLoginTimeout函数是起作用的。设置了这个参数,在恶劣的网络环境中就不会有连接数据库的函数长时间不返回的情况。
2。JDBC Developer!ˉs Guide and Refer ......
JAVA程序员面试之葵花宝典
1、面向对象的特征有哪些方面
1.抽象:抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。抽象包括两个方面,一是过程抽象,二是数据抽象。
2.继承:继承是一种联结类的层次模 ......
package org.bupt.test;
import java.util.ArrayList;
class MyResource {
ArrayList<Integer> arrList= new ArrayList<Integer>();
public MyResource(ArrayList<Integer> arrList) {
this.arrList = arrList;
&nbs ......