Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java´òÓ¡µÄÔ´´úÂë(ʾÀý)

package com.demo;
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import java.awt.print.*;
import java.util.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.swing.*;
/**
This program demonstrates how to print 2D graphics
*/
public class PrintTest
{
public static void main(String[] args)
{
JFrame frame = new PrintTestFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
/**
This frame shows a panel with 2D graphics and buttons
to print the graphics and to set up the page format.
*/
class PrintTestFrame extends JFrame
{
public PrintTestFrame()
{
setTitle("PrintTest");
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);

canvas = new PrintPanel();
add(canvas, BorderLayout.CENTER);
attributes = new HashPrintRequestAttributeSet();
JPanel buttonPanel = new JPanel();
JButton printButton = new JButton("Print");
buttonPanel.add(printButton);
printButton.addActionListener(new
ActionListener()
{
public void actionPerformed(ActionEvent event)
{
try
{
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(canvas);
if (job.printDialog(attributes))
job.print(attributes);
}
catch (PrinterException e)
{
JOptionPane.showMessageDialog(PrintTestFrame.this, e);
}
}
});
JButton pageSetupButton = new JButton("Page setup");
buttonPanel.add(pageSetupButton);
pageSetupButton.addActionListener(new
ActionListener()
{
public void actionPerformed(ActionEvent event)
{
PrinterJob job = PrinterJob.getPrinterJob();


Ïà¹ØÎĵµ£º

Java´úÂë±àдµÄ30Ìõ½¨Òé

(1) ÀàÃûÊ××ÖĸӦ¸Ã´óд¡£×ֶΡ¢·½·¨ÒÔ¼°¶ÔÏ󣨾ä±ú£©µÄÊ××ÖĸӦСд¡£¶ÔÓÚËùÓбêʶ·û£¬ÆäÖаüº¬µÄËùÓе¥´Ê¶¼Ó¦½ô¿¿ÔÚÒ»Æð£¬¶øÇÒ´óдÖм䵥´ÊµÄÊ××Öĸ¡£ÀýÈ磺
ThisIsAClassName
thisIsMethodOrFieldName
ÈôÔÚ¶¨ÒåÖгöÏÖÁ˳£Êý³õʼ»¯×Ö·û£¬Ôò´óдstatic final»ù±¾ÀàÐͱêʶ·ûÖеÄËùÓÐ×Öĸ¡£ÕâÑù±ã¿É±êÖ¾³öËüÃÇÊôÓÚ±àÒëÆÚµ ......

Java¼Ü¹¹Ê¦ËùÐèÒªµÄ֪ʶ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......

javaµ÷ÓÃnotes API ·¢ËÍÓʼþ

×î½üÐèÒªµ÷ÓÃNotes java APIÀ´·¢ËÍÓʼþ.Ö÷Òª²Î¿¼ÁËÒÔÏÂÁ½¸ö²©¿Í:
1   http://www.blogjava.net/jiangmin/articles/76137.html
Õâ¸ö²©¿ÍÍê³ÉÁË´úÂëµÄÖ÷Ìå. (°Ñ´úÂëÕ³Ìù¹ýÀ´,ÂíÉÏ¿ÉÒÔÓÃ)
ÓÐÒ»¸öµØ·½ÐèÒª¸üÕý:
   ͨ¹ý Session s = NotesFactory.createSession((String)null, (String)null, "tops3cr3 ......

JAVA¶ÔXMLµÄ¼¸ÖÖ½âÎö·½·¨½²½â£¨JDOM£©

Ϊ¼õÉÙDOM¡¢SAXµÄ±àÂëÁ¿£¬³öÏÖÁËJDOM£»
Óŵ㣺¼«´ó¼õÉÙÁË´úÂëÁ¿¡£
ʹÓó¡ºÏ£ºÒªÊµÏֵŦÄܼòµ¥£¬Èç½âÎö¡¢´´½¨µÈ£¬µ«Ôڵײ㣬JDOM»¹ÊÇʹÓÃSAX£¨×î³£Óã©¡¢DOM¡¢XananÎĵµ¡£
±ØÐëµÃÏÂÔØjdom.jarÎļþ
package xml.jdom;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOExce ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ