亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? menucolor.java

?? 記事本 編譯四個(gè)源文件
?? JAVA
字號:
import java.awt.*; 
import java.awt.event.*; 

import javax.swing.*; 

public class MenuColor extends JDialog 
implements ItemListener, 
ActionListener, 
TextListener, 
AdjustmentListener { 

CheckboxGroup gp; 
Checkbox fore, back; 
Scrollbar scrollbarRed, scrollbarGreen, scrollbarBlue; 
TextField textFieldRed, textFieldGreen, textFieldBlue; 
Button colorButtonOk, colorButtonCancel; 
Checkbox colorCheckbox; 
TextField colorTextField; 
boolean changed = true; 
boolean synchronism = false; 
Color[] fbgc = new Color[2]; 
Color[] fbgcOld = new Color[2]; 
boolean isFore = true; 

MenuColor(Frame frame, boolean modal) { 
super(frame, modal); 
} 

public Color[] myLayout(Color fgc, Color bgc) { 
fbgc[0] = fgc; 
fbgc[1] = bgc; 
fbgcOld[0] = fgc; 
fbgcOld[1] = bgc; 
this.getContentPane().setLayout(new GridBagLayout()); 
GridBagConstraints gbc = new GridBagConstraints(); 
gbc.gridwidth = 1; 
gbc.gridheight =1; 
gbc.weightx = 1; 
gbc.weighty = 1; 
gbc.fill = gbc.HORIZONTAL; 
gbc.anchor = gbc.CENTER; 

//CheckboxGroup for fore and back ground 
gp = new CheckboxGroup(); 
fore = new Checkbox("Foreground", true, gp); 
back = new Checkbox("Background", false, gp); 
gbc.gridx = 1; 
gbc.gridy = 0; 
getContentPane().add(fore, gbc); 
gbc.gridx = 3; 
gbc.gridy = 0; 
getContentPane().add(back, gbc); 
fore.addItemListener(this); 
back.addItemListener(this); 

// 3 groups of Label + ScrollBar + TextField 
Label labelRed = new Label("Red"); 
gbc.gridx = 0; 
gbc.gridy = 1; 
getContentPane().add(labelRed, gbc); 
scrollbarRed = new Scrollbar(Scrollbar.HORIZONTAL, 0, 1, 0, 256); 
scrollbarRed.setValue(fgc.getRed()); 
gbc.gridx = 1; 
gbc.gridy = 1; 
getContentPane().add(scrollbarRed, gbc); 
scrollbarRed.addAdjustmentListener(this); 
textFieldRed = new TextField(3); 
textFieldRed.setText(scrollbarRed.getValue() + ""); 
textFieldRed.addTextListener(this); 
//textFieldRed.setEditable(false); 
gbc.gridx = 2; 
gbc.gridy = 1; 
getContentPane().add(textFieldRed, gbc); 

Label labelGreen = new Label("Green"); 
gbc.gridx = 0; 
gbc.gridy = 2; 
getContentPane().add(labelGreen, gbc); 
scrollbarGreen = new Scrollbar(Scrollbar.HORIZONTAL, 0, 1, 0, 256); 
scrollbarGreen.setValue(fgc.getGreen()); 
gbc.gridx = 1; 
gbc.gridy = 2; 
getContentPane().add(scrollbarGreen, gbc); 
scrollbarGreen.addAdjustmentListener(this); 
textFieldGreen = new TextField(3); 
textFieldGreen.setText(scrollbarGreen.getValue() + ""); 
//textFieldGreen.addTextListener(this); 
textFieldGreen.setEditable(false); 
gbc.gridx = 2; 
gbc.gridy = 2; 
getContentPane().add(textFieldGreen, gbc); 

Label labelBlue = new Label("Blue"); 
gbc.gridx = 0; 
gbc.gridy = 3; 
getContentPane().add(labelBlue, gbc); 
scrollbarBlue = new Scrollbar(Scrollbar.HORIZONTAL, 0, 1, 0, 256); 
scrollbarBlue.setValue(fgc.getBlue()); 
gbc.gridx = 1; 
gbc.gridy = 3; 
getContentPane().add(scrollbarBlue, gbc); 
scrollbarBlue.addAdjustmentListener(this); 
textFieldBlue = new TextField(3); 
textFieldBlue.setText(scrollbarBlue.getValue() + ""); 
//textFieldBlue.addTextListener(this); 
textFieldBlue.setEditable(false); 
gbc.gridx = 2; 
gbc.gridy = 3; 
getContentPane().add(textFieldBlue, gbc); 

//2 Buttons: Ok and Cancel 
colorButtonOk = new Button("Ok"); 
gbc.gridx = 4; 
gbc.gridy = 1; 
gbc.fill = gbc.NONE; 
getContentPane().add(colorButtonOk,gbc); 
colorButtonOk.addActionListener(this); 

colorButtonCancel = new Button("Cancel"); 
gbc.gridx = 4; 
gbc.gridy = 2; 
getContentPane().add(colorButtonCancel,gbc); 
colorButtonCancel.addActionListener(this); 

//a Checkbox for locking RGB Scrollbar to synchronize 
colorCheckbox = new Checkbox("Lock RGB", false); 
gbc.gridx = 3; 
gbc.gridy = 3; 
getContentPane().add(colorCheckbox,gbc); 
colorCheckbox.addItemListener(this); 

//a TextField for demo the color 
colorTextField = new TextField("Java awt"); 
//have to disable this because of 70% decrease in color when setEditable(false) 
//and color can′t be corrected by increasing 1/(70%) since >255 
//colorTextField.setEditable(false); 
colorTextField.setSize(90, 60); 
colorTextField.setForeground(fgc); 
colorTextField.setBackground(bgc); 
colorTextField.setFont(new Font("Courier", Font.BOLD + Font.ITALIC, 36)); 
gbc.gridx = 3; 
gbc.gridy = 1; 
gbc.fill = gbc.BOTH; 
getContentPane().add(colorTextField, gbc); 

this.addWindowListener(new WindowAdapter() { 
public void windowClosing(WindowEvent e) { 
dispose(); 
} 
}); 
this.setLocation(120, 120); 
this.setResizable(false); 
this.setSize(480,160); 
this.setVisible(true); 
if(changed) { 
return fbgc; 
} 
else 
return fbgcOld; 
}//end of myLayout 

//ActionListener 
public void actionPerformed(ActionEvent ae) { 
if(ae.getSource() == colorButtonOk) { 
changed = true; 
dispose(); 
} 
else if(ae.getSource() == colorButtonCancel) { 
changed = false; 
dispose(); 
} 
}//end of ActionListener 

//ItemListener 
public void itemStateChanged(ItemEvent ie) { 
if(ie.getSource() == fore) { 
isFore = true; 
scrollbarRed.setValue(fbgc[0].getRed()); 
textFieldRed.setText(scrollbarRed.getValue() + ""); 
scrollbarGreen.setValue(fbgc[0].getGreen()); 
textFieldGreen.setText(scrollbarGreen.getValue() + ""); 
scrollbarBlue.setValue(fbgc[0].getBlue()); 
textFieldBlue.setText(scrollbarBlue.getValue() + ""); 
colorTextField.setForeground(setColorVarSrollbar()); 
} 
else if(ie.getSource() == back) { 
isFore = false; 
scrollbarRed.setValue(fbgc[1].getRed()); 
textFieldRed.setText(scrollbarRed.getValue() + ""); 
scrollbarGreen.setValue(fbgc[1].getGreen()); 
textFieldGreen.setText(scrollbarGreen.getValue() + ""); 
scrollbarBlue.setValue(fbgc[1].getBlue()); 
textFieldBlue.setText(scrollbarBlue.getValue() + ""); 
colorTextField.setBackground(setColorVarSrollbar()); 
} 
else if(ie.getSource() == colorCheckbox) { 
if(colorCheckbox.getState()) { 
synchronism = true; 
} 
else { 
synchronism = false; 
} 
} 
}//end of ItemListener 

//AdjustmentListener 
public void adjustmentValueChanged(AdjustmentEvent ade) { 
if(ade.getSource() == scrollbarRed) { 
if(synchronism) { 
textFieldRed.setText(scrollbarRed.getValue() + ""); 
scrollbarGreen.setValue(scrollbarRed.getValue()); 
textFieldGreen.setText(scrollbarRed.getValue() + ""); 
scrollbarBlue.setValue(scrollbarRed.getValue()); 
textFieldBlue.setText(scrollbarRed.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
else { 
textFieldRed.setText(scrollbarRed.getValue()+""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
} 
else if(ade.getSource() == scrollbarGreen) { 
if(synchronism) { 
textFieldGreen.setText(scrollbarGreen.getValue() + ""); 
scrollbarBlue.setValue(scrollbarGreen.getValue()); 
textFieldBlue.setText(scrollbarGreen.getValue() + ""); 
scrollbarRed.setValue(scrollbarGreen.getValue()); 
textFieldRed.setText(scrollbarGreen.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
else { 
textFieldGreen.setText(scrollbarGreen.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
} 
else if(ade.getSource() == scrollbarBlue) { 
if(synchronism) { 
textFieldBlue.setText(scrollbarBlue.getValue() + ""); 
scrollbarRed.setValue(scrollbarBlue.getValue()); 
textFieldRed.setText(scrollbarBlue.getValue() + ""); 
scrollbarGreen.setValue(scrollbarBlue.getValue()); 
textFieldGreen.setText(scrollbarBlue.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
else { 
textFieldBlue.setText(scrollbarBlue.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
} 
}//end of AdjustmentListener 

//TextListener 
public void textValueChanged(TextEvent te) { 
if(te.getSource() == textFieldRed) { 
int i = 0; 
try { 
i = Integer.parseInt(textFieldRed.getText()); 
} catch(NumberFormatException nfe) { 
} 
if(i < 0) 
i = 0; 
if(i > 255) 
i = 255; 
scrollbarRed.setValue(i); 
if(synchronism) { 
scrollbarGreen.setValue(scrollbarRed.getValue()); 
textFieldGreen.setText(scrollbarRed.getValue() + ""); 
scrollbarBlue.setValue(scrollbarRed.getValue()); 
textFieldBlue.setText(scrollbarRed.getValue() + ""); 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 
else { 
if(isFore) { 
colorTextField.setForeground(setColorVarSrollbar()); 
fbgc[0] = setColorVarSrollbar(); 
} 
else { 
colorTextField.setBackground(setColorVarSrollbar()); 
fbgc[1] = setColorVarSrollbar(); 
} 
} 

} 
//else if(te.getSource() == textFieldGreen) { 
//} conflict with textFieldRed 
//else if(te.getSource() == textFieldBlue) { 
//} 
}//end of TextListener 

private Color setColorVarSrollbar() { 
return new Color(scrollbarRed.getValue(), 
scrollbarGreen.getValue(), 
scrollbarBlue.getValue()); 
} 

}//end of class MenuColor 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色美美综合视频| 日本成人中文字幕| 成人av中文字幕| 国产日韩精品久久久| 国产一区二区三区日韩| 精品欧美久久久| 久久精品国产澳门| 欧美激情综合在线| 91久久久免费一区二区| 亚洲一级不卡视频| 91精品在线观看入口| 国产美女在线观看一区| 亚洲欧洲成人自拍| 欧美日韩中字一区| 久久97超碰色| 最好看的中文字幕久久| 欧美探花视频资源| 国产一本一道久久香蕉| 亚洲精选视频免费看| 4438成人网| 大陆成人av片| 亚洲第一在线综合网站| 久久久欧美精品sm网站 | 亚洲福利国产精品| 69堂国产成人免费视频| 国产美女久久久久| 亚洲成人av资源| 国产偷国产偷亚洲高清人白洁| av成人免费在线观看| 五月天久久比比资源色| 国产欧美综合色| 欧美日韩国产大片| www.在线欧美| 老司机精品视频一区二区三区| 国产精品麻豆视频| 日韩欧美亚洲一区二区| 99国产精品久久久久| 久久av老司机精品网站导航| 久久影院午夜论| 欧美日韩一卡二卡三卡| 国产suv精品一区二区三区| 天涯成人国产亚洲精品一区av| 欧美国产激情二区三区 | 久久亚洲私人国产精品va媚药| 91碰在线视频| 国内精品伊人久久久久av影院| 一区二区三区不卡视频在线观看| 26uuu色噜噜精品一区二区| 欧美日韩免费观看一区三区| 成人av资源在线| 国产九色精品成人porny| 五月激情丁香一区二区三区| 亚洲男人的天堂在线观看| 久久久久久久久久电影| 欧美videos大乳护士334| 欧美三级韩国三级日本三斤| 99久久99久久久精品齐齐 | aaa亚洲精品一二三区| 麻豆国产91在线播放| 三级不卡在线观看| 一区二区成人在线视频| 国产精品国产三级国产普通话蜜臀 | 久久综合九色欧美综合狠狠| 欧美三级电影在线看| 色狠狠一区二区三区香蕉| 岛国精品在线观看| 福利一区福利二区| 国产精品亚洲第一区在线暖暖韩国| 日韩中文字幕不卡| 亚洲va在线va天堂| 亚洲h动漫在线| 日韩专区中文字幕一区二区| 亚洲尤物在线视频观看| 一区二区三区成人在线视频| 一区二区高清免费观看影视大全| 亚洲精品福利视频网站| 亚洲精品视频自拍| 亚洲一线二线三线视频| 久色婷婷小香蕉久久| 日产国产高清一区二区三区| 日韩精品国产精品| 蜜桃视频在线观看一区二区| 日韩精品成人一区二区三区| 爽好多水快深点欧美视频| 日韩精品电影在线| 国产一区福利在线| 国产.精品.日韩.另类.中文.在线.播放 | 激情国产一区二区| 国产精品白丝av| 成人黄色一级视频| 日本韩国一区二区| 欧美日韩二区三区| 日韩精品一区二区三区蜜臀 | 久久精品欧美日韩| 国产精品国产馆在线真实露脸| 国产精品狼人久久影院观看方式| 日韩毛片一二三区| 午夜av一区二区| 乱一区二区av| av成人动漫在线观看| 欧美日韩精品一区二区| 日韩精品资源二区在线| 国产日本欧洲亚洲| 亚洲一区二区精品视频| 免费欧美日韩国产三级电影| 国产综合色产在线精品| 91视频国产观看| 在线成人免费观看| 国产日产亚洲精品系列| 亚洲精品欧美在线| 麻豆精品一区二区av白丝在线| 国产盗摄一区二区| 欧美偷拍一区二区| 国产午夜亚洲精品午夜鲁丝片| 亚洲美女电影在线| 蓝色福利精品导航| 91国产免费观看| 久久久久亚洲综合| 亚洲在线视频免费观看| 狠狠色丁香久久婷婷综合_中| 99久久婷婷国产综合精品电影 | 日韩一级免费观看| 国产精品久久久久一区二区三区| 午夜天堂影视香蕉久久| 国产露脸91国语对白| 欧美丝袜丝交足nylons| 久久嫩草精品久久久久| 亚洲综合一区二区三区| 国产精品一线二线三线精华| 欧美亚洲高清一区二区三区不卡| 欧美不卡在线视频| 亚洲一区二区视频在线观看| 国产精品一区二区你懂的| 欧美日韩黄视频| 亚洲欧美在线高清| 国产精品69毛片高清亚洲| 欧美三级在线看| 中文字幕日韩精品一区| 狠狠色丁香久久婷婷综| 欧美精品久久一区| 亚洲激情网站免费观看| 国产成人在线电影| 欧美成人三级在线| 亚洲v精品v日韩v欧美v专区| 91免费国产在线观看| 国产女人水真多18毛片18精品视频| 日本成人在线网站| 欧美亚一区二区| 亚洲六月丁香色婷婷综合久久| 国产精品1区2区3区在线观看| 91精品国产色综合久久| 亚洲综合丁香婷婷六月香| 337p亚洲精品色噜噜狠狠| 亚洲乱码中文字幕| 91亚洲精品久久久蜜桃网站| 国产欧美在线观看一区| 国产成人在线视频网站| 精品国产sm最大网站免费看| 男男视频亚洲欧美| 欧美电影在线免费观看| 午夜欧美视频在线观看| 欧美日韩一区二区三区高清| 亚洲综合在线观看视频| 在线亚洲精品福利网址导航| 亚洲综合视频在线观看| 在线一区二区三区四区| 一区二区三区日韩欧美| 在线精品观看国产| 亚洲国产精品久久久久婷婷884| 欧美性猛片aaaaaaa做受| 一区二区三区精密机械公司| 91高清视频在线| 亚洲电影中文字幕在线观看| 欧美日韩亚洲高清一区二区| 亚洲第一福利一区| 欧美二区三区91| 日韩不卡免费视频| 精品乱人伦小说| 国产在线视频精品一区| 欧美国产成人在线| 91在线视频官网| 一区二区三区中文字幕精品精品| 色婷婷综合久久久久中文一区二区| 亚洲免费av在线| 欧美日韩的一区二区| 日韩av一级电影| 久久夜色精品一区| 99视频热这里只有精品免费| 亚洲精品成人少妇| 欧美精品第1页| 精品亚洲免费视频| 中文字幕不卡在线观看| 色综合天天综合网天天看片| 亚洲不卡在线观看| 精品国产精品网麻豆系列| 高清在线成人网| 亚洲蜜桃精久久久久久久| 777a∨成人精品桃花网| 国产伦精品一区二区三区免费迷 | 粉嫩一区二区三区性色av|