【正文】
abel()。 //把標簽加入布局管理器 add(label2)。//在指定位置繪制標簽 (600,40,150,50)。//兩個標簽用于顯示時間和日期 tRemain=new TextField((remain)+張 ,10)。//表示此控件不可編輯 add(tRemain)。//在指定位置繪制 tSold=new TextField((sold)+張 ,10)。//表示此控件不可編輯 add(tSold)。//在指定位置繪制 tTotal=new TextField((total)+元 ,10)。//表示此控件不可編輯 add(tTotal)。//在指定位置繪制 m_Graphics=getGraphics()。//在 mylabel1上添加字符串 今日電 影: add(myLabel1)。//在指定位置繪制 Label myLabel2=new Label(速度與激情 7)。 (300,60,150,50)。 add(myLabel3)。 Label myLabel4=new Label(剩余票: )。 (300,160,80,50)。 add(myLabel5)。 Label myLabel6=new Label(票價 :13排 10元 46排 5元 710排 2元 )。 (5,200,500,50)。 for(int i=1。i++){ yy=230+35*(i1)。j=20。 Button mybutton=new Button((i)+排+(j)+號 )。//加入布局管理器 ()。//將按鈕移動到指定的位置 (50,30)。 }//瀏覽器關閉的時候調用該方法 private void displayImage(Graphics g) { if(!m_fAllLoaded)return。 //繪制圖片,播放動畫 } public void paint(Graphics g) { if(m_fAllLoaded) { displayImage(g)。 }//若成功加載圖片則調用 displayImage()顯示,若沒有則顯示 Loading images.... SuppressWarnings(deprecation) public boolean action(Event evt,Object arg) { int price=0。//根據捕捉到的目標確定按鈕信息,并存儲在一個按鈕對象中 String label3=()。139。039。}else price=10。 case39。:price=10。 case39。:price=10。 case39。:price=5。 case39。:price=5。 case39。:price=5。 case39。:price=2。 case39。:price=2。 case39。:price=2。 default:return false。//將按鈕文本替換為 已售出 ()。//現存的票數減 1 sold++。//總價相應增加 ((remain)+張 )。//將售出票數重新輸出 ((total)+元 )。 }//根據用戶點擊的按鈕來判斷票價,座位號,改變相關的參數值 public void start() { if(m_TickedSale==null) { m_TickedSale=new Thread(this)。 } } public void stop(){ if(m_TickedSale!=null){ ()。 } } public void run() { int m_nCurrImage=0。 m_Images=new Image[NUM_IMAGES]。//調用媒體跟蹤器 Media Tracker來加載圖像 String strImage。i=NUM_IMAGES。//若成功加載圖片,取得指定路徑的圖片, ().getImage(...) 方法可接受 String 或者是 URL 參數,用以指定圖像文件的路徑 else m_Images[i1]=getImage(getDocumentBase(),strImage)。 //將圖片在布局管理器中顯示 } try{ ()。//調用了 isErrorAny方法,用來檢查并確定任何被追蹤的圖像是否產生了錯 誤。 }//try,catch來捕獲圖片加載異常 if(!m_fAllLoaded) { stop()。 return。//產生重繪事件 while(true){ try{ displayImage(m_Graphics)。 if(m_nCurrImage==NUM_IMAGES)m_nCurrImage=0。 }//播放圖片 catch(InterruptedException e){ stop()。 to implement , do not want to, dare not, not with disciplinary ruler to supervision。 not to have conquered, but to have fought well. 2, the plain is the background of life. Live a plain life, give up on themselves is not a coward, but the wise answers。 not unrewarding perfunctorily, but calm attitude of life of unrestrained selfconfidence. Plain living, there is no noise noisy, no earthly troubles, more did not fill in the discontent of desire, some just a calm, a calm. 3, memory of heart will not good things to erase the, life is a When no movie, pain is a beginning, the struggle is a kind of process, death is a kind of ending. Give up this giving up is the helpless, do not give up the abandoned, do not give up this giving up is ignorance, do not give up should not give up is persistent. 4, a thing figured is heaven, think impassability is hell. Since the living, to live better. Sometimes we because of too narrowminded, too care around the chores and penny wise and pound foolish, not worth the candle. Some things to attract trouble and worry, pletely depends on how we look at and deal with it. Don39。t get into a blind alley, don39。t be narrowminded. Poke to care, is a kind of openminded, a free and easy. 5, I am not afraid of others behind me a knife, I afraid to look back and see stab me, is my intention to treat people。m afraid he turned to it as a joke to tell don39。 and when we are in a negative state of mind, you will find many depressed things。 loss of sink, Eritrea pany. When you are in adversity, may wish to change a point of view to think everything over to the good Think, because good mentality decided the fate of the! 7, people are tired, rest。 you pain, no one can understand. Then you only tears to smile. 8, each people have youth, Each youth are a story, the life of the world never gets easier, I want what, wish the world all know, as has been the same。s mouth, because words will reduce its importance。t envy who. Like a person is a kind of feeling, not like a person is true. The truth is easy to explain, I feel Is unspeakable. The best travel life is that you in a strange place found a long lost touched. 11, happy life not in the bustling in, and in the peace of mind。am, like a movie, learn to appreciate, learn to be grateful, learn tolerance, and goodness, helping others. Instead of accusing the society, as into one。t envy him A sum of, don39。t let everyone like you, so also do not want to do. Life is too short to go crazy to love to go to waste, to chase the dream to regret. 15, when temper, a blessing to go. A wounding elegant people, the key is to control their own emotions. With the mouth is the most stupid behavior. A control negative emotions than a can take a city more powerful water flow slow, language is expensive. People spent two years of time to learn to speak, but to spend a few years time to shut up. That is a kind of ability, that is a kind of wisdom. 16, life is not perfect, sometimes, growth is not a cry, not an eyeful of tears, there is no trace of emotion, there is no gleam of hope, no desire, no actio