-
public class Server extends Thread { Client client int counter public Server(Cli...
public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter < 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter >= 10") } public static void main(String[] args) { Client c = new Client() Server s = new Server(c) c.start() s.start() } } class Client extends Thread { Vector queue public Client() { this.queue = new Vector() } public void run() { while (true) { if (! (queue.size() == 0)) { processNextElement() } } } private void processNextElement() { Object next = queue.elementAt(0) queue.removeElementAt(0) System.out.println(next)-public class Server extends Thread { Client client int counter public Server(Client _client) { this.client = _client this.counter = 0 } public void run() { while (counter lt; 10) { this.client.queue.addElement(new Integer(counter)) counter++ } throw new RuntimeException("counter gt;= 10") } p
- 2022-02-21 05:44:37下载
- 积分:1
-
一个锁定表头和表列的Grid控件,界面比较简单
一个锁定表头和表列的Grid控件,界面比较简单-a table lock head and listed Grid Control, a relatively simple interface
- 2023-04-21 08:50:04下载
- 积分:1
-
此编程的实用性非常的强大,适合于任何场合,可供任何人群使用。...
此编程的实用性非常的强大,适合于任何场合,可供任何人群使用。-The practicality of this programming is very powerful, suitable for any occasion, available for use in any crowd.
- 2022-10-03 08:00:03下载
- 积分:1
-
XML document processing : a simple XML document processing control
XML文档处理:一个简明的XML文档处理控制-XML document processing : a simple XML document processing control
- 2022-02-02 19:25:39下载
- 积分:1
-
variable static text control
可变的静态文本控件-variable static text control
- 2022-08-20 23:29:45下载
- 积分:1
-
CStatic文本的外观
首先在单击1行中调用CTestWindow::Create函数。它是CFrameWnd对象的Create函数,因为CTestWin...
CStatic文本的外观
首先在单击1行中调用CTestWindow::Create函数。它是CFrameWnd对象的Create函数,因为CTestWindow从CFrameWnd继承了其行为。所以第一行中的代码指定了窗口大小应该为200×200个象素,窗口的左上角被初始化在屏幕的0,0位置处。常数rectDefault可用CRect参数来替代。-CStatic text the appearance of the first line in one click call CTestWindow:: Create function. It is a CFrameWnd object Create function, because CTestWindow inherited from CFrameWnd their behavior. So the first line of code specifies the window size should be 200 × 200 pixel, the window has been initialized in the upper left corner of the screen position 0,0. CRect parameter rectDefault constants can be used as substitutes.
- 2023-06-06 03:15:03下载
- 积分:1
-
我写了一个界面友好的时钟继承CStatic类,包装水平。
一个本人写得界面友好的时钟,时钟继承CStatic类,封装为ocx控件。-I write a friendly interface clocks succession CStatic category, Packaging for ocx control.
- 2022-05-09 00:09:09下载
- 积分:1
-
电子8段管,可以显示任意数字
电子8段管,可以显示任意数字-eight of electronic tubes, arbitrary figures show
- 2022-04-28 10:25:17下载
- 积分:1
-
可用于显示信息的测量装置
一个可以用来显示信息的仪表控件。- May use for the displayed information the measuring appliance
to control.
- 2022-01-23 11:22:56下载
- 积分:1
-
有背景颜色的静态控件
有背景颜色的静态控件-The static control which has background color
- 2022-05-27 14:56:08下载
- 积分:1