v0.01
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1 @@
|
|||
/bin/
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>AHClient</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.0 KiB |
|
@ -0,0 +1,14 @@
|
|||
package client;
|
||||
|
||||
import frame.AHJFrame;
|
||||
|
||||
public class Client{
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
AHJFrame frame = new AHJFrame();
|
||||
frame.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,712 @@
|
|||
package frame;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.border.LineBorder;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
|
||||
import showGoodsInfo.ButtonRenderer;
|
||||
|
||||
import javax.swing.JRadioButton;
|
||||
|
||||
import panel.AHJPanel;
|
||||
|
||||
import java.awt.SystemColor;
|
||||
|
||||
public class AHJFrame extends JFrame {
|
||||
private static final long serialVersionUID = 1322349709073516450L;
|
||||
private AHJPanel panelMain;
|
||||
private JPanel panelLeft;
|
||||
private JPanel panelCenter;
|
||||
private JPanel panelBottom;
|
||||
private JPanel panelTop;
|
||||
private JPanel panelTop_Top;
|
||||
private JPanel panelTop_Top_Left;
|
||||
private JPanel panelTop_Top_Right;
|
||||
private JPanel panelTop_Center;
|
||||
private JPanel panelTop_Menu;
|
||||
private JPanel panelTop_Center_Left;
|
||||
private JPanel panelTop_Center_Bottom;
|
||||
private JPanel panelTop_Center_Center;
|
||||
private JPanel panelTop_Center_Right;
|
||||
private JPanel panelTop_Center_Center_Info;
|
||||
private JPanel panelTop_CCI_TopGap;
|
||||
private JPanel panelTop_CCI_LeftGap;
|
||||
private JPanel panelTop_CCI_RightGap;
|
||||
private JPanel panelTop_CCI_BottomGap;
|
||||
private JPanel panelTop_CCI;
|
||||
private JPanel panelTop_CCI_Button;
|
||||
private JPanel panelTop_CCI_Info;
|
||||
private JLabel labelTitel;
|
||||
private JLabel label_6;
|
||||
private JButton btnCloseWindow;
|
||||
private JButton btnMinWindow;
|
||||
private JButton btnMenu1;
|
||||
private JButton btnMenu2;
|
||||
private JButton btnMenu3;
|
||||
private JButton btnMenu4;
|
||||
private JButton button_1;
|
||||
private JButton button_2;
|
||||
private JPanel panelRight;
|
||||
private JPanel panelGoodsType;
|
||||
private JPanel panelGoodsList;
|
||||
private JPanel panelGoodsTypeInfo;
|
||||
private JPanel panelGoodsTypeGap;
|
||||
private JPanel panelGTITitle;
|
||||
private JScrollPane scrollPane;
|
||||
private JTable table;
|
||||
private JButton btnNewButton;
|
||||
private JScrollPane scrollPaneGoodsList;
|
||||
private JTable tableGoodsList;
|
||||
private String[] strTb1Header;
|
||||
private Object[][] objRTableContents;
|
||||
private JPanel panelGLBottom;
|
||||
private JPanel panelGLBGap;
|
||||
private JPanel panelGLBInfo;
|
||||
private JPanel panelGLBIleft;
|
||||
private JLabel label;
|
||||
private JPanel panelGLBIRight;
|
||||
private JRadioButton radioButton;
|
||||
private JRadioButton radioButton_1;
|
||||
private JButton button;
|
||||
private JPanel panelGLBICenter;
|
||||
private JTextField textField;
|
||||
private Container panel_39;
|
||||
private JPanel panelGLBICGapN;
|
||||
private JPanel panelGLBICGapS;
|
||||
private JPanel panelGLBICGapW;
|
||||
private JPanel panelGLBICGapE;
|
||||
private JPanel panelBGapN;
|
||||
private JPanel panelBGapW;
|
||||
private JPanel panelBGapE;
|
||||
private JPanel panelBGapS;
|
||||
private JPanel panelBottomCenterInfo;
|
||||
private JPanel panelBCIl;
|
||||
private JPanel panelBCIC;
|
||||
private JLabel label_2;
|
||||
private JPanel panelBCIR;
|
||||
private JLabel label_3;
|
||||
private JLabel label_4;
|
||||
private int m_iImageCount;
|
||||
|
||||
public AHJFrame() {
|
||||
initial();
|
||||
|
||||
//顶部面板
|
||||
creatTopPanel();
|
||||
|
||||
//中间面板
|
||||
creatCenterPanel();
|
||||
|
||||
//底部面板
|
||||
creatBottomPanel();
|
||||
}
|
||||
|
||||
private void initial()
|
||||
{
|
||||
panelMain = new AHJPanel();
|
||||
m_iImageCount = 0;
|
||||
panelLeft = new JPanel();
|
||||
panelCenter = new JPanel();
|
||||
panelBottom = new JPanel();
|
||||
panelTop = new JPanel();
|
||||
panelTop_Top = new JPanel();
|
||||
panelTop_Top_Left = new JPanel();
|
||||
panelTop_Top_Right = new JPanel();
|
||||
panelTop_Center = new JPanel();
|
||||
panelTop_Menu = new JPanel();
|
||||
panelTop_Center_Left = new JPanel();
|
||||
panelTop_Center_Bottom = new JPanel();
|
||||
panelTop_Center_Center = new JPanel();
|
||||
panelTop_Center_Right = new JPanel();
|
||||
panelTop_Center_Center_Info = new JPanel();
|
||||
panelTop_CCI_TopGap = new JPanel();
|
||||
panelTop_CCI_LeftGap = new JPanel();
|
||||
panelTop_CCI_RightGap = new JPanel();
|
||||
panelTop_CCI_BottomGap = new JPanel();
|
||||
panelTop_CCI = new JPanel(){
|
||||
public void paintComponent(Graphics g) {
|
||||
ImageIcon icon = new ImageIcon("images/scrollpane1.png");
|
||||
// 图片随窗体大小而变化
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
};
|
||||
scrollPane = new JScrollPane(){
|
||||
public void paintComponent(Graphics g) {
|
||||
ImageIcon icon = new ImageIcon("images/scrollpane2.png");
|
||||
// 图片随窗体大小而变化
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
};
|
||||
panelBottomCenterInfo = new JPanel(){
|
||||
public void paintComponent(Graphics g) {
|
||||
ImageIcon icon = new ImageIcon("images/scrollpane3.png");
|
||||
// 图片随窗体大小而变化
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
};
|
||||
panelGLBInfo = new JPanel(){
|
||||
public void paintComponent(Graphics g) {
|
||||
ImageIcon icon = new ImageIcon("images/scrollpane4.png");
|
||||
// 图片随窗体大小而变化
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
};
|
||||
scrollPaneGoodsList = new JScrollPane(){
|
||||
public void paintComponent(Graphics g) {
|
||||
ImageIcon icon = new ImageIcon("images/scrollpane5.png");
|
||||
// 图片随窗体大小而变化
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
};
|
||||
|
||||
table = new JTable(){ // 设置jtable的单元格为透明的
|
||||
public Component prepareRenderer(
|
||||
TableCellRenderer renderer, int row, int column) {
|
||||
Component c = super.prepareRenderer(renderer, row, column);
|
||||
if (c instanceof JComponent) {
|
||||
((JComponent) c).setOpaque(false);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
};
|
||||
|
||||
tableGoodsList = new JTable(){ // 设置jtable的单元格为透明的
|
||||
public Component prepareRenderer(
|
||||
TableCellRenderer renderer, int row, int column) {
|
||||
Component c = super.prepareRenderer(renderer, row, column);
|
||||
if (c instanceof JComponent) {
|
||||
((JComponent) c).setOpaque(false);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
};
|
||||
panelTop_CCI.setForeground(Color.WHITE);
|
||||
panelTop_CCI_Button = new JPanel();
|
||||
panelTop_CCI_Info = new JPanel();
|
||||
|
||||
setTitle("校内拍卖系统");
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
//setExtendedState(JFrame.MAXIMIZED_BOTH);
|
||||
Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(getGraphicsConfiguration());
|
||||
setBounds(0, 0, Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height - screenInsets.bottom);
|
||||
setUndecorated(true);
|
||||
|
||||
getContentPane().add(panelMain, BorderLayout.CENTER);
|
||||
panelMain.setLayout(new BorderLayout(0, 0));
|
||||
panelMain.setBorder(new LineBorder(Color.GRAY, 1, true));
|
||||
}
|
||||
|
||||
private void creatTopPanel()
|
||||
{
|
||||
//panelTop.setPreferredSize(new Dimension(300, 70));
|
||||
panelTop.setLayout(new BorderLayout(0, 0));
|
||||
panelTop.setOpaque(false);
|
||||
panelMain.add(panelTop, BorderLayout.NORTH);
|
||||
|
||||
//顶部标题按钮区
|
||||
panelTop.add(panelTop_Top, BorderLayout.NORTH);
|
||||
panelTop_Top.setOpaque(false);
|
||||
panelTop_Top.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelTop_Top.add(panelTop_Top_Left, BorderLayout.WEST);
|
||||
panelTop_Top_Left.setOpaque(false);
|
||||
|
||||
labelTitel = new JLabel("校内拍卖系统");
|
||||
labelTitel.setForeground(Color.WHITE);
|
||||
labelTitel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
labelTitel.setFont(new Font("宋体", Font.BOLD, 14));
|
||||
labelTitel.setPreferredSize(new Dimension(150, 30));
|
||||
panelTop_Top_Left.add(labelTitel);
|
||||
|
||||
panelTop_Top.add(panelTop_Top_Right, BorderLayout.EAST);
|
||||
panelTop_Top_Right.setOpaque(false);
|
||||
|
||||
btnCloseWindow = new JButton("X");
|
||||
btnCloseWindow.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
|
||||
btnMinWindow = new JButton("—");
|
||||
panelTop_Top_Right.add(btnMinWindow);
|
||||
panelTop_Top_Right.add(btnCloseWindow);
|
||||
|
||||
//顶部功能按钮区
|
||||
panelTop.add(panelTop_Center, BorderLayout.CENTER);
|
||||
panelTop_Center.setOpaque(false);
|
||||
panelTop_Center.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelTop_Center_Left.setOpaque(false);
|
||||
//panelTop_Center.add(panelTop_Center_Left, BorderLayout.WEST);
|
||||
|
||||
panelTop_Center_Bottom.setOpaque(false);
|
||||
panelTop_Center.add(panelTop_Center_Bottom, BorderLayout.SOUTH);
|
||||
|
||||
panelTop_Center_Center.setOpaque(false);
|
||||
panelTop_Center.add(panelTop_Center_Center, BorderLayout.CENTER);
|
||||
panelTop_Center_Center.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelTop_Center_Right.setOpaque(false);
|
||||
panelTop_Center.add(panelTop_Center_Right, BorderLayout.EAST);
|
||||
|
||||
panelTop_Menu.setPreferredSize(new Dimension(420, 70));
|
||||
panelTop_Menu.setOpaque(false);
|
||||
panelTop_Center_Center.add(panelTop_Menu, BorderLayout.WEST);
|
||||
panelTop_Menu.setLayout(new GridLayout(0, 4, 0, 0));
|
||||
|
||||
btnMenu1 = new JButton("");
|
||||
btnMenu1.setIcon(new ImageIcon("images/menu_top1.png"));
|
||||
btnMenu1.setBorder(null);
|
||||
btnMenu1.setContentAreaFilled(false);
|
||||
panelTop_Menu.add(btnMenu1);
|
||||
|
||||
btnMenu2 = new JButton("");
|
||||
btnMenu2.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
JDialog jdWindow = new JDialog();
|
||||
jdWindow.setVisible(true);
|
||||
}
|
||||
});
|
||||
btnMenu2.setIcon(new ImageIcon("images/menu_top2.png"));
|
||||
btnMenu2.setBorder(null);
|
||||
btnMenu2.setContentAreaFilled(false);
|
||||
panelTop_Menu.add(btnMenu2);
|
||||
|
||||
btnMenu3 = new JButton("");
|
||||
btnMenu3.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
String strImgName = "images/bg" + ++m_iImageCount % 7 + ".jpg";
|
||||
ImageIcon icon = new ImageIcon(strImgName);
|
||||
// 图片随窗体大小而变化
|
||||
panelMain.setBgImage(icon);
|
||||
}
|
||||
});
|
||||
btnMenu3.setIcon(new ImageIcon("images/menu_top3.png"));
|
||||
btnMenu3.setPressedIcon(new ImageIcon("images/menu_top3_2.png"));
|
||||
btnMenu3.setRolloverIcon(new ImageIcon("images/menu_top3_1.png"));
|
||||
btnMenu3.setBorder(null);
|
||||
btnMenu3.setContentAreaFilled(false);
|
||||
panelTop_Menu.add(btnMenu3);
|
||||
|
||||
btnMenu4 = new JButton("");
|
||||
btnMenu4.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
String strImgName = "images/bg" + ++m_iImageCount % 7 + ".jpg";
|
||||
ImageIcon icon = new ImageIcon(strImgName);
|
||||
// 图片随窗体大小而变化
|
||||
panelMain.setBgImage(icon);
|
||||
}
|
||||
});
|
||||
btnMenu4.setIcon(new ImageIcon("images/menu_top4.png"));
|
||||
btnMenu4.setBorder(null);
|
||||
btnMenu4.setContentAreaFilled(false);
|
||||
panelTop_Menu.add(btnMenu4);
|
||||
|
||||
panelTop_Center_Center_Info.setOpaque(false);
|
||||
panelTop_Center_Center.add(panelTop_Center_Center_Info, BorderLayout.CENTER);
|
||||
panelTop_Center_Center_Info.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelTop_CCI_TopGap.setOpaque(false);
|
||||
panelTop_CCI_TopGap.setBackground(Color.WHITE);
|
||||
panelTop_Center_Center_Info.add(panelTop_CCI_TopGap, BorderLayout.NORTH);
|
||||
|
||||
panelTop_CCI_LeftGap.setOpaque(false);
|
||||
panelTop_CCI_LeftGap.setBackground(Color.WHITE);
|
||||
panelTop_Center_Center_Info.add(panelTop_CCI_LeftGap, BorderLayout.WEST);
|
||||
|
||||
panelTop_CCI_RightGap.setOpaque(false);
|
||||
panelTop_CCI_RightGap.setBackground(Color.WHITE);
|
||||
//panelTop_Center_Center_Info.add(panelTop_CCI_RightGap, BorderLayout.EAST);
|
||||
|
||||
panelTop_CCI_BottomGap.setOpaque(false);
|
||||
panelTop_CCI_BottomGap.setBackground(Color.WHITE);
|
||||
panelTop_Center_Center_Info.add(panelTop_CCI_BottomGap, BorderLayout.SOUTH);
|
||||
|
||||
panelTop_CCI.setOpaque(false);
|
||||
panelTop_CCI.setBorder(new LineBorder(SystemColor.textHighlight, 1, true));
|
||||
panelTop_CCI.setBackground(Color.WHITE);
|
||||
panelTop_Center_Center_Info.add(panelTop_CCI, BorderLayout.CENTER);
|
||||
panelTop_CCI.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
label_6 = new JLabel("某某,您好。您已参与交易90笔,信用度9000,当前正在交易商品80件。");
|
||||
label_6.setForeground(Color.WHITE);
|
||||
label_6.setPreferredSize(new Dimension(390, 46));
|
||||
label_6.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
label_6.setFont(new Font("微软雅黑", Font.BOLD, 14));
|
||||
panelTop_CCI.add(label_6, BorderLayout.CENTER);
|
||||
|
||||
FlowLayout fl_panelTop_CCI_Button = (FlowLayout) panelTop_CCI_Button.getLayout();
|
||||
fl_panelTop_CCI_Button.setVgap(15);
|
||||
panelTop_CCI_Button.setOpaque(false);
|
||||
panelTop_CCI_Button.setBackground(Color.WHITE);
|
||||
panelTop_CCI.add(panelTop_CCI_Button, BorderLayout.EAST);
|
||||
|
||||
button_1 = new JButton("登录");
|
||||
panelTop_CCI_Button.add(button_1);
|
||||
|
||||
button_2 = new JButton("注册");
|
||||
panelTop_CCI_Button.add(button_2);
|
||||
|
||||
panelTop_CCI_Info.setOpaque(false);
|
||||
panelTop_CCI_Info.setBackground(Color.WHITE);
|
||||
panelTop_CCI.add(panelTop_CCI_Info, BorderLayout.WEST);
|
||||
}
|
||||
|
||||
private void creatCenterPanel()
|
||||
{
|
||||
//中间左侧面板
|
||||
panelLeft = new JPanel();
|
||||
panelMain.add(panelLeft, BorderLayout.WEST);
|
||||
panelLeft.setOpaque(false);
|
||||
|
||||
//中间右侧面板
|
||||
panelCenter = new JPanel();
|
||||
panelMain.add(panelCenter, BorderLayout.CENTER);
|
||||
panelCenter.setOpaque(false);
|
||||
panelCenter.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelGoodsType = new JPanel();
|
||||
panelGoodsType.setPreferredSize(new Dimension(200, 36));
|
||||
panelGoodsType.setOpaque(false);
|
||||
panelCenter.add(panelGoodsType, BorderLayout.WEST);
|
||||
panelGoodsType.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelGoodsTypeInfo = new JPanel();
|
||||
panelGoodsTypeInfo.setOpaque(false);
|
||||
panelGoodsType.add(panelGoodsTypeInfo, BorderLayout.CENTER);
|
||||
panelGoodsTypeInfo.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelGTITitle = new JPanel();
|
||||
panelGTITitle.setOpaque(false);
|
||||
|
||||
JButton btnNewButton_2 = new JButton("商品类型筛选");
|
||||
btnNewButton_2.setBorder(new LineBorder(SystemColor.textHighlight, 1, true));
|
||||
panelGoodsTypeInfo.add(btnNewButton_2, BorderLayout.NORTH);
|
||||
btnNewButton_2.setPreferredSize(new Dimension(200, 36));
|
||||
|
||||
scrollPane.setOpaque(false);
|
||||
scrollPane.getViewport().setOpaque(false);
|
||||
scrollPane.setBorder(new LineBorder(SystemColor.textHighlight));
|
||||
panelGoodsTypeInfo.add(scrollPane, BorderLayout.CENTER);
|
||||
|
||||
table.setOpaque(false);
|
||||
table.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
int iTableRow = table.rowAtPoint(arg0.getPoint());
|
||||
int iCCount = 16;
|
||||
int iRCount = 7;
|
||||
objRTableContents = new Object[iCCount][iRCount];
|
||||
for(int iIndex = 0; iIndex < iCCount; ++iIndex)
|
||||
{
|
||||
for(int iIndex_1 = 0; iIndex_1 < iRCount; ++iIndex_1)
|
||||
{
|
||||
switch(iIndex_1)
|
||||
{
|
||||
case 0:
|
||||
objRTableContents[iIndex][iIndex_1] = Integer.toString(iIndex);
|
||||
break;
|
||||
case 1:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号商品名";
|
||||
break;
|
||||
case 2:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号发起人";
|
||||
break;
|
||||
case 3:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号竞拍价格";
|
||||
break;
|
||||
case 4:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号竞拍人";
|
||||
break;
|
||||
case 5:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号竞拍状态,类型" + table.getValueAt(iTableRow, 0);
|
||||
break;
|
||||
case 6:
|
||||
//objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号商品详情";
|
||||
break;
|
||||
default:
|
||||
objRTableContents[iIndex][iIndex_1] = "第" + Integer.toString(iIndex + 1) + "号商品名";
|
||||
break;
|
||||
}
|
||||
//objRTableContents[iIndex][iIndex_1] = Integer.toString(iIndex + 1) + Integer.toString(iIndex_1);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setCellRenderer(new ButtonRenderer("详情"));
|
||||
}
|
||||
}
|
||||
tableGoodsList.setModel(new DefaultTableModel(objRTableContents,strTb1Header));
|
||||
tableGoodsList.getColumn(strTb1Header[0]).setMaxWidth(60);
|
||||
tableGoodsList.getColumn(strTb1Header[5]).setMinWidth(160);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setMinWidth(80);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setMaxWidth(80);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setCellRenderer(new ButtonRenderer("详情"));;
|
||||
tableGoodsList.setRowHeight(30);
|
||||
tableGoodsList.getColumnModel().setColumnMargin(10);
|
||||
tableGoodsList.setRowMargin(8);
|
||||
//JDialog jdWindow = new showGoodsInfo();
|
||||
//jdWindow.setVisible(true);
|
||||
}
|
||||
});
|
||||
table.setModel(new DefaultTableModel(
|
||||
new Object[][] {
|
||||
{"全部商品1"},
|
||||
{"全部商品2"},
|
||||
{"全部商品3"},
|
||||
{"全部商品4"},
|
||||
{"全部商品5"},
|
||||
{"全部商品6"},
|
||||
{"全部商品7"},
|
||||
{"全部商品8"},
|
||||
{"全部商品9"},
|
||||
{"全部商品10"},
|
||||
{"全部商品11"},
|
||||
{"全部商品12"},
|
||||
{"全部商品13"},
|
||||
{"全部商品14"},
|
||||
{"全部商品15"},
|
||||
{"全部商品16"},
|
||||
{"全部商品17"},
|
||||
},
|
||||
new String[] {
|
||||
"商品类型筛选"
|
||||
}
|
||||
));
|
||||
table.setShowGrid(false);
|
||||
//table.setShowVerticalLines(false);
|
||||
table.setRowHeight(35);
|
||||
table.getColumnModel().setColumnMargin(20);
|
||||
table.setRowMargin(8);
|
||||
table.getTableHeader().setPreferredSize(new Dimension(0, 0));
|
||||
scrollPane.setViewportView(table);
|
||||
|
||||
panelGoodsTypeGap = new JPanel();
|
||||
panelGoodsTypeGap.setOpaque(false);
|
||||
panelGoodsType.add(panelGoodsTypeGap, BorderLayout.EAST);
|
||||
|
||||
panelGoodsList = new JPanel();
|
||||
panelGoodsList.setOpaque(false);
|
||||
panelCenter.add(panelGoodsList, BorderLayout.CENTER);
|
||||
panelGoodsList.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
btnNewButton = new JButton("商品列表信息");
|
||||
btnNewButton.setSelectedIcon(null);
|
||||
btnNewButton.setBorder(new LineBorder(SystemColor.textHighlight, 1, true));
|
||||
panelGoodsList.add(btnNewButton, BorderLayout.NORTH);
|
||||
btnNewButton.setPreferredSize(new Dimension(100, 36));
|
||||
|
||||
scrollPaneGoodsList.setOpaque(false);
|
||||
scrollPaneGoodsList.getViewport().setOpaque(false);
|
||||
scrollPaneGoodsList.setBorder(new LineBorder(new Color(51, 153, 255)));
|
||||
panelGoodsList.add(scrollPaneGoodsList, BorderLayout.CENTER);
|
||||
|
||||
tableGoodsList.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
JDialog jdWindow = new JDialog();
|
||||
jdWindow.setVisible(true);
|
||||
}
|
||||
});
|
||||
tableGoodsList.setRowSelectionAllowed(false);
|
||||
initRTableContents();
|
||||
tableGoodsList.setOpaque(false);
|
||||
tableGoodsList.setModel(new DefaultTableModel(objRTableContents,strTb1Header));
|
||||
tableGoodsList.getColumn(strTb1Header[0]).setMaxWidth(60);
|
||||
tableGoodsList.getColumn(strTb1Header[5]).setMinWidth(160);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setMinWidth(80);
|
||||
tableGoodsList.getColumn(strTb1Header[6]).setMaxWidth(80);
|
||||
//table_1.getColumn(strTb1Header[6]).setCellRenderer(new ButtonRenderer("详情"));;
|
||||
tableGoodsList.setRowHeight(30);
|
||||
tableGoodsList.getColumnModel().setColumnMargin(10);
|
||||
tableGoodsList.setRowMargin(8);
|
||||
scrollPaneGoodsList.setViewportView(tableGoodsList);
|
||||
|
||||
panelGLBottom = new JPanel();
|
||||
panelGLBottom.setOpaque(false);
|
||||
panelGoodsList.add(panelGLBottom, BorderLayout.SOUTH);
|
||||
panelGLBottom.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelGLBGap = new JPanel();
|
||||
panelGLBGap.setOpaque(false);
|
||||
panelGLBottom.add(panelGLBGap, BorderLayout.NORTH);
|
||||
|
||||
panelGLBInfo.setPreferredSize(new Dimension(100, 50));
|
||||
panelGLBInfo.setBorder(new LineBorder(Color.WHITE, 1, true));
|
||||
panelGLBInfo.setBackground(SystemColor.textHighlight);
|
||||
panelGLBottom.add(panelGLBInfo, BorderLayout.CENTER);
|
||||
panelGLBInfo.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelGLBIleft = new JPanel();
|
||||
panelGLBIleft.setOpaque(false);
|
||||
panelGLBInfo.add(panelGLBIleft, BorderLayout.WEST);
|
||||
|
||||
label = new JLabel("快速搜索");
|
||||
label.setPreferredSize(new Dimension(260, 38));
|
||||
label.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
label.setFont(new Font("微软雅黑", Font.BOLD, 18));
|
||||
panelGLBIleft.add(label);
|
||||
|
||||
panelGLBIRight = new JPanel();
|
||||
panelGLBInfo.add(panelGLBIRight, BorderLayout.EAST);
|
||||
panelGLBIRight.setOpaque(false);
|
||||
panelGLBIRight.setLayout(new FlowLayout(FlowLayout.CENTER, 30, 10));
|
||||
|
||||
radioButton = new JRadioButton("模糊搜索");
|
||||
radioButton.setOpaque(false);
|
||||
radioButton.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
radioButton_1.setSelected(false);
|
||||
}
|
||||
});
|
||||
radioButton.setBackground(Color.WHITE);
|
||||
panelGLBIRight.add(radioButton);
|
||||
|
||||
radioButton_1 = new JRadioButton("精确搜索");
|
||||
radioButton_1.setOpaque(false);
|
||||
radioButton_1.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
radioButton.setSelected(false);
|
||||
}
|
||||
});
|
||||
panelGLBIRight.add(radioButton_1);
|
||||
|
||||
button = new JButton("搜索");
|
||||
panelGLBIRight.add(button);
|
||||
|
||||
panelGLBICenter = new JPanel();
|
||||
panelGLBICenter.setOpaque(false);
|
||||
panelGLBInfo.add(panelGLBICenter, BorderLayout.CENTER);
|
||||
panelGLBICenter.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
textField = new JTextField("输入关键词");
|
||||
textField.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
textField.setText("");
|
||||
}
|
||||
});
|
||||
|
||||
panelGLBICenter.add(textField, BorderLayout.CENTER);
|
||||
textField.setColumns(10);
|
||||
|
||||
panelGLBICGapN = new JPanel();
|
||||
panelGLBICGapN.setOpaque(false);
|
||||
panelGLBICenter.add(panelGLBICGapN, BorderLayout.NORTH);
|
||||
|
||||
panelGLBICGapS = new JPanel();
|
||||
panelGLBICGapS.setOpaque(false);
|
||||
panelGLBICenter.add(panelGLBICGapS, BorderLayout.SOUTH);
|
||||
|
||||
panelGLBICGapW = new JPanel();
|
||||
panelGLBICGapW.setOpaque(false);
|
||||
panelGLBICenter.add(panelGLBICGapW, BorderLayout.WEST);
|
||||
|
||||
panelGLBICGapE = new JPanel();
|
||||
panelGLBICGapE.setOpaque(false);
|
||||
panelGLBICenter.add(panelGLBICGapE, BorderLayout.EAST);
|
||||
|
||||
panelRight = new JPanel();
|
||||
panelMain.add(panelRight, BorderLayout.EAST);
|
||||
panelRight.setOpaque(false);
|
||||
}
|
||||
|
||||
private void initRTableContents()
|
||||
{
|
||||
int iTable_1Column = tableGoodsList.getColumnCount();
|
||||
strTb1Header = new String[] {
|
||||
"商品ID", "商品名", "发起人", "当前竞拍价格", "当前竞拍人", "您当前竞拍状态", "商品详情"
|
||||
};
|
||||
objRTableContents = (Object[][]) new Object[16][7];
|
||||
}
|
||||
|
||||
private void creatBottomPanel()
|
||||
{
|
||||
panelBottom = new JPanel();
|
||||
panelMain.add(panelBottom, BorderLayout.SOUTH);
|
||||
panelBottom.setOpaque(false);
|
||||
panelBottom.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelBGapN = new JPanel();
|
||||
panelBGapN.setOpaque(false);
|
||||
panelBottom.add(panelBGapN, BorderLayout.NORTH);
|
||||
|
||||
panelBGapW = new JPanel();
|
||||
panelBGapW.setOpaque(false);
|
||||
panelBottom.add(panelBGapW, BorderLayout.WEST);
|
||||
|
||||
panelBGapE = new JPanel();
|
||||
panelBGapE.setOpaque(false);
|
||||
panelBottom.add(panelBGapE, BorderLayout.EAST);
|
||||
|
||||
panelBGapS = new JPanel();
|
||||
panelBGapS.setOpaque(false);
|
||||
panelBottom.add(panelBGapS, BorderLayout.SOUTH);
|
||||
|
||||
panelBottomCenterInfo.setBorder(new LineBorder(SystemColor.textHighlight, 1, true));
|
||||
//panelBottomCenterInfo.setBorder(new LineBorder(new Color(0, 0, 0)));
|
||||
panelBottomCenterInfo.setBackground(SystemColor.textHighlight);
|
||||
panelBottom.add(panelBottomCenterInfo, BorderLayout.CENTER);
|
||||
panelBottomCenterInfo.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
panelBCIl = new JPanel();
|
||||
panelBCIl.setOpaque(false);
|
||||
panelBottomCenterInfo.add(panelBCIl, BorderLayout.WEST);
|
||||
|
||||
label = new JLabel("服务器状态:……在线");
|
||||
label.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
label.setFont(new Font("宋体", Font.PLAIN, 12));
|
||||
label.setPreferredSize(new Dimension(260, 28));
|
||||
panelBCIl.add(label);
|
||||
|
||||
panelBCIC = new JPanel();
|
||||
panelBCIC.setOpaque(false);
|
||||
panelBottomCenterInfo.add(panelBCIC, BorderLayout.CENTER);
|
||||
|
||||
label_2 = new JLabel("当前在线:100人");
|
||||
label_2.setPreferredSize(new Dimension(260, 28));
|
||||
label_2.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
label_2.setFont(new Font("宋体", Font.PLAIN, 12));
|
||||
panelBCIC.add(label_2);
|
||||
|
||||
panelBCIR = new JPanel();
|
||||
panelBCIR.setOpaque(false);
|
||||
panelBottomCenterInfo.add(panelBCIR, BorderLayout.EAST);
|
||||
|
||||
label_3 = new JLabel("商品总数:90件");
|
||||
label_3.setPreferredSize(new Dimension(260, 28));
|
||||
label_3.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
label_3.setFont(new Font("宋体", Font.PLAIN, 12));
|
||||
panelBCIR.add(label_3);
|
||||
|
||||
label_4 = new JLabel("可拍商品:90件");
|
||||
label_4.setPreferredSize(new Dimension(260, 28));
|
||||
label_4.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
label_4.setFont(new Font("宋体", Font.PLAIN, 12));
|
||||
panelBCIR.add(label_4);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package panel;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class AHJPanel extends JPanel{
|
||||
protected ImageIcon icon;
|
||||
public AHJPanel()
|
||||
{
|
||||
icon = new ImageIcon("images/bg0.jpg");
|
||||
}
|
||||
public void paintComponent(Graphics g) {
|
||||
// Í¼Æ¬Ëæ´°Ìå´óС¶ø±ä»¯
|
||||
super.paintComponent(g);
|
||||
g.drawImage(icon.getImage(), 0, 0, this.getSize().width, this.getSize().height, this);
|
||||
}
|
||||
public void setBgImage(ImageIcon image)
|
||||
{
|
||||
icon = image;
|
||||
this.repaint();
|
||||
}
|
||||
public ImageIcon getBgImage()
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package showGoodsInfo;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
|
||||
public class ButtonRenderer extends JButton implements TableCellRenderer
|
||||
{
|
||||
private String m_strButtonName;
|
||||
public ButtonRenderer()
|
||||
{
|
||||
this.m_strButtonName = "按钮";
|
||||
setOpaque(true);
|
||||
}
|
||||
public ButtonRenderer(String strButtonName)
|
||||
{
|
||||
this.m_strButtonName = strButtonName;
|
||||
setOpaque(true);
|
||||
}
|
||||
public Component getTableCellRendererComponent(JTable table, Object value,
|
||||
boolean bSelected, boolean arg3, int arg4, int arg5) {
|
||||
// TODO 自动生成的方法存根
|
||||
if(bSelected)
|
||||
{
|
||||
setForeground(table.getSelectionForeground());
|
||||
setBackground(table.getSelectionBackground());
|
||||
}
|
||||
else
|
||||
{
|
||||
setForeground(table.getSelectionForeground());
|
||||
setBackground(UIManager.getColor("Button.background"));
|
||||
}
|
||||
setPreferredSize(new Dimension(30, 10));
|
||||
setText(m_strButtonName);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package showGoodsInfo;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.FlowLayout;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
public class showGoodsInfo extends JDialog {
|
||||
|
||||
private final JPanel contentPanel = new JPanel();
|
||||
|
||||
/**
|
||||
* Create the dialog.
|
||||
*/
|
||||
public showGoodsInfo() {
|
||||
setBounds(100, 100, 600, 500);
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
contentPanel.setLayout(new FlowLayout());
|
||||
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
getContentPane().add(contentPanel, BorderLayout.CENTER);
|
||||
{
|
||||
JPanel buttonPane = new JPanel();
|
||||
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
|
||||
getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
||||
{
|
||||
JButton okButton = new JButton("OK");
|
||||
okButton.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent arg0) {
|
||||
setVisible(false);
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
okButton.setActionCommand("OK");
|
||||
buttonPane.add(okButton);
|
||||
getRootPane().setDefaultButton(okButton);
|
||||
}
|
||||
{
|
||||
JButton cancelButton = new JButton("Cancel");
|
||||
cancelButton.setActionCommand("Cancel");
|
||||
buttonPane.add(cancelButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
v0.01;
|