Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Remove Minimize and Maximize Button of Frame in Java

                         

In this section we are going to learn the coding methods to remove the minimize and maximize button from the title bar of a frame. We know that the title bar contains icon, minimize, maximize and close buttons. The following program provides the facility for doing it. That means, the frame or window displays on the screen without minimize and maximize button but it has only the icon and close button on the title bar that helps us at the time of closing the frame or window. See more information below.

Description of program:

This program displays a frame under the dialog box that hasn't the minimize and maximize button. It contains only a close button that performs only closing operation that means our window closes when you click on it. So follow the program for better understanding and you will find that the title bar has only close botton.  

Here is the code of program:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class RemoveMaxAndMinButton extends JDialog{
  public RemoveMaxAndMinButton(JFrame frame, String str){
    super(frame,str);
    addWindowListener(new WindowAdapter(){
            public void windowClosing(WindowEvent evt){
        System.exit(0);
            }
        });
  }
  public static void main(String[] args){
    try{
      RemoveMaxAndMinButton frame = new RemoveMaxAndMinButton(new JFrame(),
            
"Remove the Minimize and Maximize button from the Title Bar");
      JPanel panel = new JPanel();
      panel.setSize(200,200);
      JLabel lbl = new JLabel("RoseIndia.Net");
      panel.add(lbl);
      frame.add(panel);
      frame.setSize(400400);
      frame.setVisible(true);
    }
    catch(IllegalArgumentException e){
      System.exit(0);
    }
  
}

Download this example.

Output of program:

 

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (
post your own) View All Comments Latest 10 Comments:

Under Solaris operation system with MOTIF, it doesn't work.

Posted by Mestahh on Thursday, 05.29.08 @ 11:45am | #61329

Latest Searches:
access element of html
tabindex
session
jsf tab
goto
oXygen
default radio button i
how to reload page aft
add a list box in a fo
Java Mysql
drop down list
The eXo platform
java programm for arra
combo box my sql
Building a Simple EJB
connect SQL server in
write int to file
insert data to text fi
for loop tutorial
websphere portal
java ????¢Ñ????? ?????
xml database
load file
how to run ruby applic
Connection Pooling cod
actions forms
Websphere portal 6.0
application.xml
Read the content of te
struts2 acegi
xml stream
SIMPLE JAVA SOURSE COD
unicode
validate radio button
Tiles definition richf
Jframe Tutorials
struts tree
Update in jsp
vector in java
j2ee 5 tutorial eclips
Photoshop Photo Effect
ASP Ad Management CJ s
secure
java exit button liste
get column count colu
iBatis Stored Procedur
jsp MENU SELECT MAKES
Java Pass Value
java program to check
Flash 3D How to make c
spaces in string
string length using if
jar entry
using fromIndex to che
Add listener to compon
Expression Language
ASP EXAMPLE and 1=2
string to binary
Java date format
dynamic array value
tree
parseInt
Date comp[are in JSP
how to pass same varia
retrieve image url fro
log4j
calling one jsp p
jsp select
File Upload
GameStep
login session
download struts applic
jQuery To Hide the Div
definition of interfac
month format vb.net
Java Count words,reve
retrieve image from da
jboss connection pool
standered jstl jar to
object oriented progra
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.