I want to add ftp system in my existing chat application. since i am newin java gui and networking programming .. i am not getting how to implement ftp and add ftp gui in my existing application . can anyone help me please ? chat application code is here : ----
FTP is a protocol and has nothing to do with GUI design or programming. If you want to add it into your application then you need to create the protocol rules that your client and server will follow. At its most basic it will be something like:
User selects a file and clicks the UPLOAD button.
Client system sends an FTPstart message to the server.
Server sends an acknowledge/ready message back to the client.
Client sends the next N bytes of the file.
Server responds with ACK.
... repeat until ...
Client sends NoMoreData message.
Server responds with some message to show all the data has been received and saved.
l1 = new JLabel("UserName");
txt= new JTextField(10);
l2 = new JLabel("Password");
pf = new JPasswordField(10);
bt1 = new JButton("Login");
bt2 = new JButton("Cancel");
bt3 = new JButton("Exit");
p1 = new JPanel();
public void actionPerformed(ActionEvent ae)
String user = txt.getText();//to get username textfield detail
String pwd = pf.getText();//to get passwordfield detail
JOptionPane.showMessageDialog(null,"valid user","Authentication",1);//to get dialog box when both the fields are same
public static void main(String arg)
Demoswing ob = new Demoswing();
I feel like I could make my own high level language with more logical layouts, where anything heirchy-related actually makes sense.
Here, methods are called towards the top of the page or program, and then written out and stored just below it. So the method has already been processed by the time you get down to where it is written entirely. This completely goes against the concept of a program, "a set or order of instructions to be compiled and executed," not to mention it is confusing.
This initializing of data in classes with their constructors towards the bottom of the page and referencing them from main on top of the program is illogical and ridiculus.
A program should sequentially follow steps from top to bottom, and as simple as this sounds, this concept still needs to apply at more advanced levels of programming
For this opinion that I have, what would be a better language for me to work with?
yeah, i want to know how to calculate the length of 2d array while converting it into 1d array
when i simply used a.length for my 2d array and put it into my 1d array ,then 1d array will print only first column then exception comes Array index out of bound
yup i got the idea and it works like this
int b = new int[a.length*a.length];
//output is 9
//is this the way of getting length of 2d into 1d array?
Last Visit: 31-Dec-99 18:00 Last Update: 21-May-18 21:25