done

parents
Pipeline #657 failed with stages
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="false" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/lab10.iml" filepath="$PROJECT_DIR$/lab10.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
import javax.swing.*;
class ChatArea extends JTextArea {
private static final int ROWS = 10, COLUMNS = 30;
public ChatArea() {
super(ROWS, COLUMNS);
this.setEditable(false);
this.setLineWrap(true); }
public void addMassage(){}
}
\ No newline at end of file
import javax.swing.*;
import java.awt.*;
public class ChatRoomGUI extends JFrame {
private final String WINDOWS_TITLE = "AUT Chat Room";
private final int WIDTH = 500, HEIGHT = 500;
private final int X = 100, Y = 100;
public ChatRoomGUI() {
super();
this.setTitle(WINDOWS_TITLE);
this.setLayout(new BorderLayout());
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(WIDTH, HEIGHT);
this.setLocation(X, Y);
MAssagePanel mAssagePanel=new MAssagePanel();
this.add(mAssagePanel,BorderLayout.PAGE_END);
ChatArea chatBox = new ChatArea();
this.add(new JScrollPane(chatBox), BorderLayout.CENTER);
USernamePanle uSernamePanle=new USernamePanle();
this.add(uSernamePanle,BorderLayout.LINE_START);
this.setVisible(true);
}
}
\ No newline at end of file
import javax.swing.*;
import java.awt.*;
public class MAssagePanel extends JPanel {
public MAssagePanel() {
this.setLayout(new BorderLayout());
JTextField textField= new JTextField();
JButton jButton=new JButton("Send Massage");
this.add(textField,BorderLayout.CENTER);
this.add(jButton,BorderLayout.EAST);
this.setVisible(true);
}
}
import javax.swing.*;
public class Main {
public static void main(String[] args) {
ChatRoomGUI chatRoomGUI=new ChatRoomGUI();
}
}
public class MessageArea {
}
public class ParticipantsArea {
}
import javax.swing.*;
import java.awt.*;
public class USernamePanle extends JPanel {
public USernamePanle(){
// JPanel jFrame=new JPanel();
this.setLayout(new GridLayout(5,1));
DefaultListModel<String> l1 = new DefaultListModel<>();
l1.addElement("online people");
l1.addElement("Item1");
l1.addElement("Item2");
l1.addElement("Item3");
l1.addElement("Item4");
JList<String> list = new JList<>(l1);
this.add(list);
}
}
import javax.swing.*;
import java.awt.*;
public class UserNameFrame extends JFrame {
private static final String BTN_TXT = " Start Chatting ...";
private static final String LABEL_TXT = " Choose Your UserName ";
private static final int WIDTH = 300, HEIGHT = 100;
JTextField textField;
JButton btn;
public UserNameFrame() throws HeadlessException {
super();
this.setLayout(new BorderLayout());
JLabel label = new JLabel("Choose Your UserName");
add(label, BorderLayout.PAGE_START);
textField = new JTextField();
add(textField, BorderLayout.CENTER);
btn = new JButton(LABEL_TXT);
add(btn, BorderLayout.PAGE_END);
setSize(WIDTH, HEIGHT);
setVisible(true);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment