04747_Java语言程序设计(一)_第6章_图形界面设计(二)
例6.1声明一个面板子类,面板子类对象有3个选择框。
- class Panel1 extends JPanel {
- JCheckBox box1, box2, box3;
- Panel1() {
- box1 = new JCheckBox("足球");
- box2 = new JCheckBox("排球");
- box3 = new JCheckBox("篮球");
- add(box1);
- add(box2);
- add(box3);
- }
- }
例6.2处理选择项目事件的小应用程序。
- import java.applet.*;
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- class Panel1 extends JPanel {// 扩展Panel类
- JRadioButton box1, box2, box3;
- ButtonGroup g;
- Panel1() {// 3个单选按钮为一组
- setLayout(new GridLayout(1, 3));
- g = new ButtonGroup();
- box1 = new JRadioButton(MyWindow.fName[0] + "计算机", false);
- box2 = new JRadioButton(MyWindow.fName[1] + "计算机", false);
- box3 = new JRadioButton(MyWindow.fName[2] + "计算机", false);
- g.add(box1);
- g.add(box2);
- g.add(box3);
- add(box1);
- add(box2);
- add(box3);
- add(new JLabel("计算机3选1"));
- }
- }
- class Panel2 extends JPanel {// 扩展Panel类
- JCheckBox box1, box2, box3;
- ButtonGroup g;
- Panel2() {// 3个选择框为一组
- setLayout(new GridLayout(1, 3));
- g = new ButtonGroup();
- box1 = new JCheckBox("购买1台");
- box2 = new JCheckBox("购买2台");
- box3 = new JCheckBox("购买3台");
- g.add(box1);
- g.add(box2);
- g.add(box3);
- add(box1);
- add(box2);
- add(box3);
- add(new JLabel("选择1、2或3"));
- }
- }
- class MyWindow extends JFrame implements ItemListener {
- Panel1 panel1;
- Panel2 panel2;
- JLabel label1, label2;
- JTextArea text1, text2;
- static String fName[] = { "HP", "IBM", "DELL" };// 公司名称表
- static double priTbl[][] = { { 1.20, 1.15, 1.10 }, { 1.70, 1.65, 1.60 }, { 1.65, 1.60, 1.58 } };// 产品数量价格对照表
- static int production = -1;// 产品标志
- MyWindow(String s) {
- super(s);
- Container con = this.getContentPane();
- con.setLayout(new GridLayout(3, 2));
- this.setLocation(100, 100);
- this.setSize(400, 100);
- panel1 = new Panel1();
- panel2 = new Panel2();
- label1 = new JLabel("产品介绍", JLabel.CENTER);
- label2 = new JLabel("产品价格", JLabel.CENTER);
- text1 = new JTextArea();
- text2 = new JTextArea();
- con.add(label1);
- con.add(label2);
- con.add(panel1);
- con.add(panel2);
- con.add(text1);
- con.add(text2);
- panel1.box1.addItemListener(this);
- panel1.box2.addItemListener(this);
- panel1.box3.addItemListener(this);
- panel2.box1.addItemListener(this);
- panel2.box2.addItemListener(this);
- panel2.box3.addItemListener(this);
- this.setVisible(true);
- this.pack();
- }
- public void itemStateChanged(ItemEvent e) {
- if (e.getItemSelectable() == panel1.box1) {
- production = 0;
- text1.setText(fName[0] + "公司生产");
- text2.setText("");
- } else if (e.getItemSelectable() == panel1.box2) {
- production = 1;
- text1.setText(fName[1] + "公司生产");
- text2.setText("");
- } else if (e.getItemSelectable() == panel1.box3) {
- production = 2;
- text1.setText(fName[2] + "公司生产");
- text2.setText("");
- } else {
- if (production == -1) {
- return;
- }
- if (e.getItemSelectable() == panel2.box1) {
- text2.setText("" + priTbl[production][0] + "万元/台");
- } else if (e.getItemSelectable() == panel2.box2) {
- text2.setText("" + priTbl[production][1] + "万元/台");
- } else if (e.getItemSelectable() == panel2.box3) {
- text2.setText("" + priTbl[production][2] + "万元/台");
- }
- }
- }
- }
- public class Example6_2 {
- MyWindow myWin = new MyWindow("选择项目处理示例程序");
- }
例6.3小应用程序有两个列表,第一个只允许单选,第二个列表允许多选。
- import java.applet.*;
- import javax.swing.*;
- import java.awt.*;
- import javax.swing.event.*;
- class MyWindow extends JFrame implements ListSelectionListener {
- JList list1, list2;
- String news[] = { "人民日报", "新民晚报", "浙江日报", "文汇报" };
- String sports[] = { "足球", "排球", "乒乓球", "篮球" };
- JTextArea text;
- MyWindow(String s) {
- super(s);
- Container con = getContentPane();
- con.setBackground(Color.BLUE);
- con.setLayout(new GridLayout(2, 2));
- con.setSize(200, 500);
- list1 = new JList(news);
- list1.setVisibleRowCount(3);
- list1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- list1.addListSelectionListener(this);
- list2 = new JList(sports);
- list2.setVisibleRowCount(2);
- list2.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- list2.addListSelectionListener(this);
- con.add(list1);
- con.add(list2);
- text = new JTextArea(10, 20);
- con.add(text);
- this.setVisible(true);
- this.pack();
- }
- public void valueChanged(ListSelectionEvent e) {
- if (e.getSource() == list1) {
- text.setText(null);
- Object listValue = ((JList) e.getSource()).getSelectedValue();
- String seleName = listValue.toString();
- for (int i = 0; i < news.length; i++) {
- if (news[i].equals(seleName)) {
- text.append(seleName + ":被选中\n");
- }
- }
- } else if (e.getSource() == list2) {
- text.setText(null);
- int tempList[] = list2.getSelectedIndices();// 获得选中索引
- for (int i = 0; i < tempList.length; i++) {
- text.append(sports[tempList[i]] + ":被选中\n");
- }
- }
- }
- }
- public class Example6_3 extends Applet {
- MyWindow myWin = new MyWindow("列表示例");
- }
例6.4一个说明组合框用法的应用程序。
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- public class Example6_4 {
- public static void main(String[] args) {
- ComboBoxDemo myComboBoxGUI = new ComboBoxDemo();
- }
- }
- class ComboBoxDemo extends JFrame implements ActionListener, ItemListener {
- public static final int Width = 350;
- public static final int Height = 150;
- String proList[] = { "踢足球", "打篮球", "打排球" };
- JTextField text;
- JComboBox comboBox;
- public ComboBoxDemo() {
- setSize(Width, Height);
- setTitle("组合框使用示意程序");
- Container conPane = getContentPane();
- conPane.setBackground(Color.BLUE);
- conPane.setLayout(new FlowLayout());
- comboBox = new JComboBox(proList);
- comboBox.addActionListener(this);
- comboBox.addItemListener(this);
- comboBox.setEditable(true);
- conPane.add(comboBox);
- text = new JTextField(10);
- conPane.add(text);
- this.setVisible(true);
- }
- public void actionPerformed(ActionEvent e) {
- if (e.getSource() == comboBox) {
- text.setText(comboBox.getSelectedItem().toString());
- }
- }
- public void itemStateChanged(ItemEvent e) {
- if (e.getSource() == comboBox) {
- text.setText(comboBox.getSelectedItem().toString());
- }
- }
- }
例6.5小应用程序示意窗口有菜单条的实现方法。
- import java.applet.*;
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- class MenuWindow extends JFrame implements ActionListener {
- public static JTextField text;
- private void addItem(JMenu menu, String menuName, ActionListener listener) {
- JMenuItem anItem = new JMenuItem(menuName);
- anItem.setActionCommand(menuName);
- anItem.addActionListener(listener);
- menu.add(anItem);
- }
- public MenuWindow(String s, int w, int h) {
- setTitle(s);
- Container con = this.getContentPane();
- con.setLocation(100, 100);
- this.setSize(w, h);
- JMenu menu1 = new JMenu("体育");
- addItem(menu1, "跑步", this);
- addItem(menu1, "跳绳", this);
- addItem(menu1, "打球", this);
- JMenu menu2 = new JMenu("娱乐");
- addItem(menu2, "唱歌", this);
- addItem(menu2, "跳舞", this);
- addItem(menu2, "游戏", this);
- JMenuBar menubar = new JMenuBar();
- text = new JTextField();
- menubar.add(menu1);
- menubar.add(menu2);
- setJMenuBar(menubar);
- con.add(text, BorderLayout.NORTH);
- }
- public void actionPerformed(ActionEvent e) {
- text.setText(e.getActionCommand() + "菜单项被选中!");
- }
- }
- public class Example6_5 extends Applet implements ActionListener {
- MenuWindow window;
- JButton button;
- boolean bflg;
- public void init() {
- button = new JButton("打开我的体育娱乐之窗");
- bflg = true;
- window = new MenuWindow("体育娱乐之窗", 100, 100);
- button.addActionListener(this);
- add(button);
- }
- public void actionPerformed(ActionEvent e) {
- if (e.getSource() == button) {
- if (bflg) {
- window.setVisible(true);
- bflg = false;
- button.setLabel("关闭我的体育娱乐之窗");
- } else {
- window.setVisible(false);
- bflg = true;
- button.setLabel("打开我的体育娱乐之窗");
- }
- }
- }
- }
例6.6小应用程序声明一个用户窗口类和对话框类,用户窗口有两个按钮和两个文本框,当点击某个按钮时,对应的对话框被激活。
- import java.applet.*;
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- class MyWindow extends JFrame implements ActionListener {
- private JButton button1, button2;
- private static int flg = 0;
- private static JTextField text1, text2;
- MyWindow(String s)// 窗口内有两个按钮
- {
- super(s);
- Container con = this.getContentPane();
- con.setLayout(new GridLayout(2, 2));
- this.setSize(200, 100);
- this.setLocation(100, 100);
- button1 = new JButton("选择水果");
- button2 = new JButton("选择食品");
- button1.addActionListener(this);
- button2.addActionListener(this);
- text1 = new JTextField(20);
- text2 = new JTextField(20);
- con.add(button1);
- con.add(button2);
- con.add(text1);
- con.add(text2);
- this.setVisible(true);
- this.pack();
- }
- public static void returnName(String s) {
- if (flg == 1) {
- text1.setText("选择的水果是:" + s);
- } else if (flg == 2) {
- text2.setText("选择的食品是:" + s);
- }
- }
- public void actionPerformed(ActionEvent e) {
- MyDialog dialog;
- if (e.getSource() == button1) {
- dialog = new MyDialog(this, "水果");
- dialog.setVisible(true);
- flg = 1;
- } else if (e.getSource() == button2) {
- dialog = new MyDialog(this, "食品");
- dialog.setVisible(true);
- flg = 2;
- }
- }
- }
- class MyDialog extends JDialog implements ActionListener {
- JLabel title;
- JTextField text;
- JButton done;
- MyDialog(JFrame F, String s) {
- super(F, s, true);
- Container con = this.getContentPane();
- title = new JLabel("输入" + s + "名称");
- text = new JTextField(10);
- text.setEditable(true);
- con.setLayout(new FlowLayout());
- con.setSize(200, 100);
- setModal(false);
- done = new JButton("确定");
- done.addActionListener(this);
- con.add(title);
- con.add(text);
- con.add(done);
- con.setVisible(true);
- this.pack();
- }
- public void actionPerformed(ActionEvent e) {
- MyWindow.returnName(text.getText());
- setVisible(false);
- dispose();
- }
- }
- public class Example6_6 extends Applet {
- MyWindow window;
- MyDialog diaglog;
- public void init()// 程序的主窗口暂没有组件
- {
- window = new MyWindow("带对话框窗口");// 创建一个窗口
- }
- }
例6.7应用程序将滚动条作为值的选择。
- import javax.swing.*;
- import java.awt.*;
- import java.awt.event.*;
- class MyScrollBar extends JScrollBar {
- public MyScrollBar(int init, int len, int low, int high) {
- super(JScrollBar.HORIZONTAL, init, len, low, high);
- }
- public Dimension getPreferredSize() {
- return new Dimension(125, 20);
- }
- }
- class MyWindow extends JFrame implements ActionListener, AdjustmentListener {
- private JButton button;
- private JTextField text;
- private boolean barOpened;
- MyWindow(String s) {
- super(s);
- MyScrollBar tempBar = new MyScrollBar(10, 10, 0, 255);
- Container con = this.getContentPane();
- con.setLayout(new GridLayout(2, 1));
- this.setSize(200, 100);
- this.setLocation(100, 100);
- button = new JButton("开/闭滚动条");
- button.addActionListener(this);
- barOpened = false;
- tempBar.addAdjustmentListener(this);
- text = new JTextField("滚动条关闭", 20);
- con.add(button);
- con.add(text);
- con.add(tempBar);
- this.setVisible(true);
- this.pack();
- }
- public void actionPerformed(ActionEvent e) {
- if (e.getSource() == button) {
- if (barOpened) {
- text.setText("滚动条关闭");
- } else {
- text.setText("滚动条打开");
- }
- barOpened = !barOpened;
- }
- }
- public void adjustmentValueChanged(AdjustmentEvent e) {
- if (barOpened) {
- MyScrollBar myBar = (MyScrollBar) e.getAdjustable();
- text.setText("选择的值是:" + myBar.getValue());
- }
- }
- }
- public class Example6_7 {
- public static void main(String[] args) {
- MyWindow myWindow = new MyWindow("滚动条实例");
- }
- }
例6.8小应用程序设置了一个文本区,用于记录一系列鼠标事件。
- import java.applet.*;
- import java.awt.*;
- import javax.swing.*;
- import java.awt.event.*;
- class MyPanel extends JPanel {
- public void print(int r) {
- Graphics g = getGraphics();// 获得系统给予小应用程序的图形对象
- g.clearRect(0, 0, this.getWidth(), this.getHeight());
- g.setColor(Color.red);
- g.fillOval(10, 10, r, r);// 用红色填充一个圆块
- }
- }
- class MyWindow extends JFrame implements MouseListener {
- JTextArea text;
- MyPanel panel;
- int x, y, r = 10;
- int mouseFlg = 0;
- static String mouseStates[] = { "鼠标键按下", "鼠标松开", "鼠标进来", "鼠标走开", "鼠标双击" };
- MyWindow(String s) {
- super(s);
- Container con = this.getContentPane();
- con.setLayout(new GridLayout(2, 1));
- this.setSize(200, 300);
- this.setLocation(100, 100);
- panel = new MyPanel();
- con.add(panel);
- text = new JTextArea(10, 20);
- text.setBackground(Color.blue);
- con.add(text);
- addMouseListener(this);
- this.setVisible(true);
- this.pack();
- }
- public void paint(Graphics g) {
- r = r + 4;
- if (r > 80) {
- r = 10;
- }
- text.append(mouseStates[mouseFlg] + "了,位置是:" + x + "," + y + "\n");
- panel.print(r);
- }
- public void mousePressed(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- mouseFlg = 0;
- repaint();
- }
- public void mouseReleased(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- mouseFlg = 1;
- repaint();
- }
- public void mouseEntered(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- mouseFlg = 2;
- repaint();
- }
- public void mouseExited(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- mouseFlg = 3;
- repaint();
- }
- public void mouseClicked(MouseEvent e) {
- if (e.getClickCount() == 2) {
- x = e.getX();
- y = e.getY();
- mouseFlg = 4;
- repaint();
- } else {
- }
- }
- }
- public class Example6_8 extends Applet {
- public void init() {
- MyWindow myWindow = new MyWindow("鼠标事件示意程序");
- }
- }
例6.9一个滚动条与显示窗口同步变化的应用程序。
- import java.awt.*;
- import javax.swing.*;
- import java.awt.event.*;
- class MyWindow extends JFrame {
- public MyWindow(String s) {
- super(s);
- Container con = this.getContentPane();
- con.setLayout(new GridLayout());
- this.setLocation(100, 100);
- JScrollBar xAxis = new JScrollBar(JScrollBar.HORIZONTAL, 50, 1, 0, 100);
- JScrollBar yAxis = new JScrollBar(JScrollBar.VERTICAL, 50, 1, 0, 100);
- MyListener listener = new MyListener(xAxis, yAxis, 238, 118);
- JPanel scrolledCanvas = new JPanel();
- scrolledCanvas.setLayout(new BorderLayout());
- scrolledCanvas.add(listener, BorderLayout.CENTER);
- scrolledCanvas.add(xAxis, BorderLayout.SOUTH);
- scrolledCanvas.add(yAxis, BorderLayout.EAST);
- con.add(scrolledCanvas, BorderLayout.CENTER);
- this.setVisible(true);
- this.pack();
- }
- public Dimension getPreferredSize() {
- return new Dimension(500, 300);
- }
- }
- class MyListener extends JComponent implements MouseListener, MouseMotionListener, AdjustmentListener {
- private int x, y;
- private JScrollBar xScrollBar;
- private JScrollBar yScrollBar;
- private void updateScrollBars(int x, int y) {
- int d;
- d = (int) (((float) x / (float) getSize().width) * 100.0);
- xScrollBar.setValue(d);
- d = (int) (((float) y / (float) getSize().height) * 100.0);
- yScrollBar.setValue(d);
- }
- public MyListener(JScrollBar xaxis, JScrollBar yaxis, int x0, int y0) {
- xScrollBar = xaxis;
- yScrollBar = yaxis;
- x = x0;
- y = y0;
- xScrollBar.addAdjustmentListener(this);
- yScrollBar.addAdjustmentListener(this);
- this.addMouseListener(this);// 监视鼠标点击事件
- this.addMouseMotionListener(this);// 监视鼠标拖动事件
- }
- public void paint(Graphics g) {
- g.setColor(getBackground());
- Dimension size = getSize();
- g.fillRect(0, 0, size.width, size.height);
- g.setColor(Color.blue);
- g.fillRect(x, y, 50, 50);
- }
- public void mouseEntered(MouseEvent e) {
- }
- public void mouseExited(MouseEvent e) {
- }
- public void mouseClicked(MouseEvent e) {
- }
- public void mouseReleased(MouseEvent e) {
- }
- public void mouseMoved(MouseEvent e) {
- }
- public void mousePressed(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- updateScrollBars(x, y);
- repaint();
- }
- public void mouseDragged(MouseEvent e) {
- x = e.getX();
- y = e.getY();
- updateScrollBars(x, y);
- repaint();
- }
- public void adjustmentValueChanged(AdjustmentEvent e) {
- if (e.getSource() == xScrollBar) {
- x = (int) ((float) (xScrollBar.getValue() / 100.0) * getSize().width);
- } else if (e.getSource() == yScrollBar) {
- y = (int) ((float) (yScrollBar.getValue() / 100.0) * getSize().height);
- }
- repaint();
- }
- }
- public class Example6_9 {
- public static void main(String[] args) {
- MyWindow myWindow = new MyWindow("滚动条示意程序");
- }
- }
例6.10小应用程序有一个按钮和一个文本区,按钮作为发生键盘事件的事件源,并对它实施监视。
- import java.applet.*;
- import java.awt.*;
- import java.awt.event.*;
- public class Example6_10 extends Applet implements KeyListener {
- int count = 0;
- Button button = new Button();
- TextArea text = new TextArea(5, 20);
- public void init() {
- button.addKeyListener(this);
- add(button);
- add(text);
- }
- public void keyPressed(KeyEvent e) {
- int t = e.getKeyCode();
- if (t >= KeyEvent.VK_A && t <= KeyEvent.VK_Z) {
- text.append((char) t + " ");
- count++;
- if (count % 10 == 0) {
- text.append("\n");
- }
- }
- }
- public void keyTyped(KeyEvent e) {
- }
- public void keyReleased(KeyEvent e) {
- }
- }
04747_Java语言程序设计(一)_第6章_图形界面设计(二)的更多相关文章
- ArcGIS for Desktop入门教程_第七章_使用ArcGIS进行空间分析 - ArcGIS知乎-新一代ArcGIS问答社区
原文:ArcGIS for Desktop入门教程_第七章_使用ArcGIS进行空间分析 - ArcGIS知乎-新一代ArcGIS问答社区 1 使用ArcGIS进行空间分析 1.1 GIS分析基础 G ...
- ArcGIS for Desktop入门教程_第六章_用ArcMap制作地图 - ArcGIS知乎-新一代ArcGIS问答社区
原文:ArcGIS for Desktop入门教程_第六章_用ArcMap制作地图 - ArcGIS知乎-新一代ArcGIS问答社区 1 用ArcMap制作地图 作为ArcGIS for Deskto ...
- ArcGIS for Desktop入门教程_第四章_入门案例分析 - ArcGIS知乎-新一代ArcGIS问答社区
原文:ArcGIS for Desktop入门教程_第四章_入门案例分析 - ArcGIS知乎-新一代ArcGIS问答社区 1 入门案例分析 在第一章里,我们已经对ArcGIS系列软件的体系结构有了一 ...
- python 教程 第十九章、 图形界面编程
第十九章. 图形界面编程 import Tkinter top = Tkinter.Tk() hello = Tkinter.Label(top, text='Hello World!') hello ...
- 04747_Java语言程序设计(一)_第3章_面向对象编程基础
链式编程 每次调用方法后,返回的是一个对象 /* * 链式编程 * 每次调用方法后,返回的是一个对象 */ class Student { public void study() { System.o ...
- 04747_Java语言程序设计(一)_第1章_Java语言基础
二进制0b开头 八进制0开头 十六进制0x开头 package com.jacky; public class Aserver { public static void main(String arg ...
- 04747_Java语言程序设计(一)_第10章_网络与数据库编程基础
例10.1说明InetAddress类的用法的应用程序. public class Example10_1 { public static void main(String args[]) { try ...
- 04747_Java语言程序设计(一)_第9章_输入和输出流
例9.1一个文件复制应用程序,将某个文件的内容全部复制到另一个文件. import java.io.*; public class Example9_1 { public static void ma ...
- 04747_Java语言程序设计(一)_第8章_多线程
例8.1应用程序用Thread子类实现多线程. import java.util.Date; public class Example8_1 { static Athread threadA; sta ...
- 04747_Java语言程序设计(一)_第7章_图形、图像与多媒体
例7.1小应用程序用6种字型显示字符串,显示内容说明本身的字型. import java.applet.*; import java.awt.*; public class Example7_1 ex ...
随机推荐
- 马士兵 Servlet & JSP(1) Servlet (源代码)
1.HTTP协议基础测试(获取页面源代码) import java.io.BufferedReader; import java.io.IOException; import java.io.Inpu ...
- C# 约瑟夫环算法
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- 【CSS3】横屏引导小动画
演示地址:http://codepen.io/anon/pen/oXbXdX 主要知识点: @media all and (orientation : landscape) { /* 这是匹配横屏的状 ...
- 浏览器内核Trident/Gecko/WebKit/Presto
“浏览器内核”主要指渲染引擎(Rendering Engine),负责解析网页语法(如HTML.JavaScript)并渲染.展示网页.因此,所谓的浏览器内核通常也就是指浏览器所采用的渲染引擎, 渲染 ...
- [Regex Expression] Use Shorthand to Find Common Sets of Characters
In this lesson we'll learn shorthands for common character classes as well as their negated forms. v ...
- WAS集群系列(6):集群搭建:步骤4:安装WAS升级软件
逐步点击"下一步",注意一处流程,例如以下列举: "升级软件"安装的路径设置,建议与之前的WAS及IHS安装的绝对路径同样,例如以下所看到的: 逐步点击,完毕安 ...
- c++11 线程:让你的多线程任务更轻松
介绍 本文旨在帮助有经验的Win32程序员来了解c++ 11线程库及同步对象 和 Win32线程及同步对象之间的区别和相似之处. 在Win32中,所有的同步对象句柄(HANDLE)是全局句柄.它们 ...
- Canvas制作排序算法演示动画
tips: 形象化演示排序算法可以让初学者快速理解,比较好的例子:jun-lu的SortAnimate,旧金山大学的David Galles教授的算法演示课件.最近在看canvas,试着用js+can ...
- Sass函数--颜色函数--RGB颜色函数
RGB颜色函数-RGB()颜色函数 主要分为 RGB , HSL 和 Opacity 三大函数,当然其还包括一些其他的颜色函数,比如说 adjust-color 和 change-color 等.1. ...
- jdbc oracle 连接字符串
1.普通SID方式 jdbc:oracle:thin:username/password@x.x.x.1:1521:SID 2.普通ServerName方式 jdbc:Oracle:thin:user ...