日期:2014-05-20 浏览次数:20763 次
package com.ccc520.component;
import javax.swing.JFrame;
import javax.swing.UIManager;
public class Test {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.ccc520.laf.IMLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
final JFrame jf = new IMFrame("鐒︺€亅浼婄瑧","/gj//lol/銆庢垜鍕掍釜鍘伙紝涔熷氨閭g偣浜嬪憲鈥︺€?","/resource/head.jpg");
/*final JPopupMenu jpm = new JPopupMenu("hehe");
jpm.setLayout(new VerticalLayout(22));
jpm.setPreferredSize(new Dimension(145,95));
IMPopupItem popupItem1 = new IMPopupItem("/resource/aio_quickbar_cut.png","鍙戦€佹枃浠?);
IMPopupItem popupItem2 = new IMPopupItem("/resource/aio_quickbar_more.png","鎵嬫満涓€璧风帺娓告垙");
IMPopupItem popupItem3 = new IMPopupItem("/resource/aio_quickbar_register.png","璐粯閫?);
IMPopupItem popupItem4 = new IMPopupItem("/resource/aio_quickbar_richface.png","鍒犻櫎濂藉弸");
jpm.add(popupItem1);
jpm.add(popupItem2);
jpm.add(new JSeparator());
jpm.add(popupItem3);
jpm.add(popupItem4);
IMPanel panel = new IMPanel(new Color(32,127,168),new Color(61,143,195),IMPanel.TOP_BOTTOM);
panel.setPreferredSize(new Dimension(0,40));
panel.setLayout(new FlowLayout(FlowLayout.LEFT,2,8));
panel.add(new IMMenuButton("/resource/b6m0_0.png"));
panel.add(new IMMenuButton("/resource/b7m0_0.png"));
panel.add(new IMMenuButton("/resource/b8m0_0.png"));
panel.add(new IMMenuButton("/resource/b9m0_0.png"));
panel.add(new IMMenuButton("/resource/b1m0_0.png"));
panel.add(new IMMenuButton("/resource/b20m0_0.png"));
jf.add(panel,BorderLayout.NORTH);
JPanel contentPanel = new JPanel();
contentPanel.setOpaque(false);
jf.add(contentPanel);
contentPanel.setLayout(new BorderLayout());
JPanel showPanel = new JPanel();
showPanel.setBorder(new LineBorder(Color.LIGHT_GRAY));
showPanel.setPreferredSize(new Dimension(140,0));
contentPanel.add(showPanel,BorderLayout.EAST);
JPanel textPanel = new JPanel();
textPanel.setLayout(new BorderLayout());
JTextPane jtp = new JTextPane();
jtp.setEditable(false);
jtp.setPreferredSize(new Dimension(0,280));
JScrollPane jsp = new JScrollPane(jtp);
jsp.setBorder(null);
textPanel.add(jsp,BorderLayout.NORTH);
IMPanel bottomPanel = new IMPanel(new Color(195,220,237),new Color(222,236,245),IMPanel.LEFT_RIGHT);
bottomPanel.setPreferredSize(new Dimension(0,32));
bottomPanel.setLayout(new FlowLayout(FlowLayout.RIGHT,5,3));
textPanel.add(bottomPanel,BorderLayout.SOUTH);
JPanel talkContent = new JPanel();
talkContent.setOpaque(false);
IMPanel controlPanel = new IMPanel(new Color(195,220,237),new Color(222,236,245),IMPanel.LEFT_RIGHT);
controlPanel.setPreferredSize(new Dimension(0,26));
controlPanel.setLayout(new FlowLayout(FlowLayout.LEFT,5,2));
talkContent.setLayout(new BorderLayout());
talkContent.add(controlPanel,BorderLayout.NORTH);
Dimension d = new Dimension(22,22);
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_cut.png",d));
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_flirtationface.png",d));
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_inputassist.png",d));
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_more.png",d));
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_register.png",d));
controlPanel.add(new IMMenuButton("/resource/aio_quickbar_richface.png",d));
textPanel.add(talkContent);
JTextPane inputPane = new JTextPane();
JScrollPane jsp1 = new JScrollPane(inputPane);
jsp1.setBorder(null);
talkContent.add(jsp1);
IMButton jb = new IMButton("鍏抽棴(C)");
bottomPanel.add(jb);
IMPopupButton popupButton = new IMPopupButton("鍙戦€?S)");
popupButton.setTriglePopupMenu(jpm);
popupButton.setOneShowLeft(true);
bottomPanel.add(popupButton);
contentPanel.add(textPanel);*/
jf.setVisible(true);
}
}