• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Few problems in chat application Gui

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am making a chat application in which I am facing few problems

1. I am using frames allover the application. When the user login into his account, the friend list of user gets displayed on a new frame whereas I want to erase the contents of login frame and display list of friends on the same frame. How to achieve this?? I have used the following statement to achieve this but it is not working.

f.getContentPane().removeAll();

2. When I closes the chat window of a particular user all the windows opened in cascade and hence client gets closed.

Please help me with these issues/

Thanks a lot...
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try using CardLayout. Google this and you should get your answer I believe.
 
Anchit Jindal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry but I think this problem is not related with layouts from any angle.

1. My first problem is the client gets automatically closed when I close the chat window of a particular client.
2. My second problem is that I am not able to display the list of friends on the login window if the client successfully login. The list of friends gets displayed on a separate window.

I cannot understand what these problems have to do with layouts. Please explain me in detail where and why you are suggesting me to use card layout
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Sorry but I think this problem is not related with layouts from any angle.
...
> I cannot understand what these problems have to do with layouts.
> Please explain me in detail where and why you are suggesting me to use card layout

better for you to have a look at the cardlayout tutorial - it does sound ideally suited to your description
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic