How to avoid multiple frames?

I am creating a Java desktop application. In this application I have one table. If the user double clicks the row of table, the corresponding data was viewed in another window [frame -> view frame]. The user minimizes the view frame and selects another row in a table. It was again open in a new window [frame].

How to avoid the multiple frame? I want only one view frame at a time. Suppose the user want to view new data then the old view frame will exit and new view frame will open.

Answers


Make the frame an instance variable. Whenever you have to display a new frame, check if it is already displayed and if it is, first close the existing one and then display the new one.


Need Your Help

Turning off echo in script

linux bash shell

I have recently put together a script for my hostapd ap.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.