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

¶þ¡¢£¨1£©Êý¾Ý²ã ÓйØJava´úÂë

l×é¼þ´Ó¹¦ÄÜÉÏ·Ö¿É·ÖΪ£º
   1) ¶¥²ãÈÝÆ÷£ºJFrame,JApplet,JDialog,JWindow
   2) ÖмäÈÝÆ÷£ºJPanel,JScrollPane,JSplitPane,JToolBar¡¡
   3) ÌØÊâÈÝÆ÷£ºÔÚGUIÉÏÆðÌØÊâ×÷ÓõÄÖмä²ã£¬ÈçJInternalFrame,JLayeredPane,JRootPane.
1.JFrameµÄÓ÷¨
1) ÓÃgetContentPane( )·½·¨»ñµÃJFrameµÄÄÚÈÝÃæ°å£¬ÔÙ¶ÔÆä¼ÓÈë×é¼þ£º
    Container c=frame.getContentPane()
    c.add(childComponent)
 
2) ½¨Á¢Ò»¸öJPanel»ò JDesktopPaneÖ®ÀàµÄÖмäÈÝÆ÷£¬°Ñ×é¼þÌí¼Óµ½ÈÝÆ÷ÖУ¬ÓÃsetContentPane()·½·¨°Ñ¸ÃÈÝÆ÷ÖÃΪJFrame
 
  µÄÄÚÈÝÃæ°å£º
                 JPanel contentPane=new JPanel( );
……//
°ÑÆäËü×é¼þÌí¼Óµ½JpanelÖÐ;
 
frame.setContentPane(contentPane);  // °ÑcontentPane¶ÔÏóÉèÖóÉΪframeµÄÄÚÈÝÃæ°å
 
JFrameÊÇÖ÷´°¿Ú£¬¿ÉÔÚËüÉÏÌí¼ÓJDialogºÍJApplet½øÈ¥ËüµÄÄÚÈÝÃæ°åÄÚ¡£ÈçÏÂÀý×Ó£º
Class MainWindow{
 
private JFrame jFrame;
 public MainWindow(){
  jFrame=null;
  initial();
  
 }
 
 private void initial() {
    getJFrame();
  
 }
 private JFrame getJFrame() {
  if(jFrame==null){
  jFrame=new JFrame();
  jFrame.setDefaultCloseOperation(3);
  jFrame.setJMenuBar(getJMenuBar());
  jFrame.setSize(408, 400);
  jFrame.setBackground(Color.GREEN);  
  jFrame.setTitle("ISTIC Searching Engine 1.0");
  jFrame.setVisible(true);
  jFrame.setLocationByPlatform(true);
 jFrame.setContentPane(getContentPane());
  }
  return jFrame;
 }
 private Container getContentPane() {
  // TODO Auto-generated method stub
  return null;
 }
 private JMenuBar getJMenuBar() {
  // TODO Auto-generated method stub
  return null;
 }
 public static void main(Stri


Ïà¹ØÎĵµ£º

Myeclipse±¨Could not create Java VM

Myeclipse±¨Could not create Java VM
 
»·¾³£º
Myeclipse6.0£¬tomcat6.0, 2GÄÚ´æ
½ñÌìһֱʹÓÃDEBUGģʽÆô¶¯tomcatÒ»Ö±ºÜÂý£¬ËùÒÔÏëʹÓÃRUNģʽÀ´Æô¶¯£¬µ«ÊÇÿ´ÎÆô¶¯¶¼±¨´í“could not create the java virtual machine”£¬ÌáʾÉèÖÃÄÚ´æ²»×㣬°Ù¶ÈÏ£¬¶¼ÒªÇóÐÞ¸Äeclipse.iniÅäÖÃÎļþ£¬µ«ÊÇÐÞ¸ÄÁ˲»ºÃÊ ......

java ´°¿Ú¹Ø±ÕµÄÁùÖÖ·½·¨

1.ʹÓÃJFrameµÄenableEventsºÍprocessWindowEvent
//Frame1.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame1 extends JFrame {
  public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    this.setSize(ne ......

JavaÖ®ÔöÇ¿forÑ­»·

Óï·¨£º
for ( type ±äÁ¿Ãû£º¼¯ºÏ±äÁ¿Ãû )  { … } 
×¢ÒâÊÂÏ
µü´ú±äÁ¿±ØÐëÔÚ( )Öж¨Ò壡
¼¯ºÏ±äÁ¿¿ÉÒÔÊÇÊý×é»òʵÏÖÁËIterable½Ó¿ÚµÄ¼¯ºÏÀà
¾ÙÀý£º
public class AdvancedFor {
public static void main(String[] arg ......

JavaÖ®Override OverloadÖ®¼äµÄÇø±ð


overrideÊǸ²Ð´£¬¶ÔÓ¦ÓÚOO±à³ÌµÄ¼Ì³ÐÌØÐÔ£¬Òâ˼¾ÍÊÇÔÚ×ÓÀàÖÐÖØд¸¸ÀàÖеķ½·¨£»   
overloadÊÇÖØÔØ£¬¶ÔÓ¦ÓÚOO±à³ÌµÄ¶à̬ÌØÐÔ£¬Òâ˼¾ÍÊÇÔÚͬһ¸öÀàÖÐͬÑùÃû³ÆµÄ¶à¸ö·½·¨£¬ Õâ¶à¸ö·½·¨Ö®¼äµÄÇø±ðÔÚËûÃǵIJÎÊýÁв»Í¬¡£
ÀýÈ磺
public interface UserDao {
public void save(); ......

anic£º±ÈC¿ì±ÈJava°²È«±Èshell»¹¼òµ¥µÄÐÂÓïÑÔ

һλIDΪultimusµÄ³ÌÐòÔ±¿ª·¢ÁËÒ»ÖÖÃûΪanicµÄÐÂÓïÑÔ£¬½üÈÕÒýÆðÒµ½ç¹Ø×¢¡£¸ù¾ÝGoogle CodeÉϸÃÏîÄ¿µÄ¼ò½é£¬¸ÃÓïÑÔµÄÕýʽÃû³ÆÊÇANI£¬anicÊÇÕâÖÖÓïÑԵIJο¼ÊµÏÖ¡£
ANIÊÇÒ»ÖÖʵÑéÐÔ¡¢¸ßÐÔÄÜ¡¢¾²Ì¬°²È«¡¢ÍêÈ«Òþº¬Ö§³Ö²¢ÐС¢ÃæÏò¶ÔÏóµÄͨÓÃÊý¾ÝÁ÷±à³ÌÓïÑÔ¡£
anicÓÃGNU¹¤¾ßÁ´Ð´³É£¬Òò´Ë¿ÉÒÆÖ²ÐԺܺ㬿ÉÒÔÔËÐÐÓÚËùÓÐÖ÷Á÷²Ù×÷ϵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ