Eugen Marchel
Ученик
(182),
на голосовании
1 год назад
вот текст на англ. языке. может кто помочь? Using the SWING framework, create a multithreaded window application simulating the transmission of SMS messages from senders to recipients. The visual layer of the application will consist of 3 interactive panels (objects inheriting from the JPanel class), arranged by the automatic BorderLayout layout. The extreme left panel will be dedicated to displaying sending devices. This panel will consist of a JScrollPane component placed in the central part and a JButton "Add"located at the bottom of the panel. Inside the JScrollPane component, a JPanel will be placed, which will use a vertical BoxLayout to arrange all visual components representing "virtual sending devices"(VBD). Pressing the "Add"button in the sending devices panel will display a dialog box allo- wing the user to enter and confirm a short text message. Based on the entered message, an object implementing a virtual sending device (VBD) will be created, whose instances will be visualized in the panel. The visualization of the VBD object will be based on a JPanel component and will consist of components described by JLabel: • JSlider – specifying the frequency of sending messages; • JButton – allowing to terminate the VBD’s work (which will result in removing the device); • JTextField – non-editable field representing the device number; • JComboBox – allowing to indicate the WAITING or ACTIVE state, based on which the thread implementing this VBD will be able to suspend or work. The extreme right panel will be dedicated to displaying receiving devices. The struc- ture of this panel will be analogous to the structure of the sending devices panel. However, it will present virtual receiving devices (VRD), whose objects will be created as a result of pressing the "Add"button. The visualization of the VRD object will consist of components described by JLabel: • JButton – allowing to terminate the VRD’s work (which will result in removing the device); • JLabel – showing information about the number of received messages; • JCheckBox – specifying whether the information about the number of received messages should be removed every 10 seconds if checked or not otherwise. The middle panel will allow the visualization of base stations (BTS) in the extreme layers and controller stations (BSC) in the intermediate layers. This panel will consist of a JPanel component placed in the central part, containing horizontally oriented visuali- zations of BTS and BCS layers, and buttons for adding and removing BSC layers at the bottom. Each BTS or BSC layer is implemented by a JPanel in which visual components representing a single station (BTS or BCS) are arranged vertically. Each BTS or BSC station is represented as a JPanel component, consisting of com- ponents: • JLabel – representing the next unique and non-editable station number; • JButton – allowing to terminate the work of the station (which will result in remo- ving the station). 2 Application operation The user of the application creates a certain number of VBD objects, each of which is a separate thread and immediately starts transmitting the message entered during creation. SMS is passed to the BTS station with the least number of waiting SMSs. The application in its running state has three layers. There must be at least one intermediate layer of BSC controllers between the input layer and the output layer.
Using the SWING framework, create a multithreaded window application simulating
the transmission of SMS messages from senders to recipients. The visual layer of the
application will consist of 3 interactive panels (objects inheriting from the JPanel class),
arranged by the automatic BorderLayout layout.
The extreme left panel will be dedicated to displaying sending devices. This panel will
consist of a JScrollPane component placed in the central part and a JButton "Add"located
at the bottom of the panel. Inside the JScrollPane component, a JPanel will be placed,
which will use a vertical BoxLayout to arrange all visual components representing "virtual
sending devices"(VBD).
Pressing the "Add"button in the sending devices panel will display a dialog box allo-
wing the user to enter and confirm a short text message. Based on the entered message,
an object implementing a virtual sending device (VBD) will be created, whose instances
will be visualized in the panel.
The visualization of the VBD object will be based on a JPanel component and will
consist of components described by JLabel:
• JSlider – specifying the frequency of sending messages;
• JButton – allowing to terminate the VBD’s work (which will result in removing the
device);
• JTextField – non-editable field representing the device number;
• JComboBox – allowing to indicate the WAITING or ACTIVE state, based on which
the thread implementing this VBD will be able to suspend or work.
The extreme right panel will be dedicated to displaying receiving devices. The struc-
ture of this panel will be analogous to the structure of the sending devices panel. However,
it will present virtual receiving devices (VRD), whose objects will be created as a result
of pressing the "Add"button.
The visualization of the VRD object will consist of components described by JLabel:
• JButton – allowing to terminate the VRD’s work (which will result in removing the
device);
• JLabel – showing information about the number of received messages;
• JCheckBox – specifying whether the information about the number of received
messages should be removed every 10 seconds if checked or not otherwise.
The middle panel will allow the visualization of base stations (BTS) in the extreme
layers and controller stations (BSC) in the intermediate layers. This panel will consist of
a JPanel component placed in the central part, containing horizontally oriented visuali-
zations of BTS and BCS layers, and buttons for adding and removing BSC layers at the
bottom.
Each BTS or BSC layer is implemented by a JPanel in which visual components
representing a single station (BTS or BCS) are arranged vertically.
Each BTS or BSC station is represented as a JPanel component, consisting of com-
ponents:
• JLabel – representing the next unique and non-editable station number;
• JButton – allowing to terminate the work of the station (which will result in remo-
ving the station).
2 Application operation
The user of the application creates a certain number of VBD objects, each of which is a
separate thread and immediately starts transmitting the message entered during creation.
SMS is passed to the BTS station with the least number of waiting SMSs.
The application in its running state has three layers. There must be at least one
intermediate layer of BSC controllers between the input layer and the output layer.