<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Interview Questions &#187; java.awt.Frame</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/awt-question/javaawtframe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<lastBuildDate>Fri, 30 Jul 2010 06:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Making a Frame Non-Resizable in Java</title>
		<link>http://www.bestjavainterviewquestions.com/making-a-frame-non-resizable-in-java/</link>
		<comments>http://www.bestjavainterviewquestions.com/making-a-frame-non-resizable-in-java/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 18:17:31 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[java.awt.Frame]]></category>
		<category><![CDATA[Awt Frame class]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=447</guid>
		<description><![CDATA[yes u can make the applet program resizable. In java  there is a method called setResizable method. This method which is responsible for modifying the size of the window on  your applet/awt program   . In your program, Assume that you have taken a boolean value false for method setResizable then the frame will be non-resizable [...]]]></description>
			<content:encoded><![CDATA[<p><strong>yes u can make the applet program resizable.</strong></p>
<p>In java  there is a method called setResizable method. This method which is responsible for modifying the size of the window on  your applet/awt program   .<br />
In your program, Assume that you have taken a boolean value false for method setResizable then the frame will be non-resizable otherwise frame will be resizable, The setResizable method is the method of Frame class.</p>
<p>Here is the few related methods views of the Frame Class Supported by the api of jdk1.5</p>
<hr /><strong><br />
SW_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int SW_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.SW_RESIZE_CURSOR.</p>
<hr /><strong><br />
SE_RESIZE_CURSOR</strong><br />
<em><br />
@Deprecated</em><br />
public static final int SE_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.SE_RESIZE_CURSOR.</p>
<hr /><strong>NW_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int NW_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.NW_RESIZE_CURSOR.</p>
<hr /><strong>NE_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int NE_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.NE_RESIZE_CURSOR.</p>
<hr /><strong>N_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int N_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.N_RESIZE_CURSOR.</p>
<hr /><strong><br />
S_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int S_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.S_RESIZE_CURSOR.</p>
<hr /><strong>W_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int W_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.W_RESIZE_CURSOR.</p>
<hr /><strong>E_RESIZE_CURSOR</strong></p>
<p><em>@Deprecated</em><br />
public static final int E_RESIZE_CURSOR</p>
<p>Deprecated. replaced by Cursor.E_RESIZE_CURSOR.</p>
<hr /><strong><br />
isResizable</strong></p>
<p>public boolean isResizable()</p>
<p>Indicates whether this frame is resizable by the user. By default, all frames are initially resizable.</p>
<p>Returns:<br />
true if the user can resize this frame; false otherwise.</p>
<hr /><strong>setResizable</strong></p>
<p>public void setResizable(boolean resizable)</p>
<p>Sets whether this frame is resizable by the user.</p>
<p>Parameters:<br />
resizable &#8211; true if this frame is resizable; false otherwise.</p>
<hr /><strong>setState</strong></p>
<p>public void setState(int state)</p>
<p>Sets the state of this frame (obsolete).</p>
<p>In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.</p>
<p>For compatibility with old programs this method still accepts Frame.NORMAL and Frame.ICONIFIED but it only changes the iconic state of the frame, other aspects of frame state are not affected by this method.</p>
<p>Parameters:<br />
state &#8211; either Frame.NORMAL or Frame.ICONIFIED.<br />
See Also:<br />
getState(), setExtendedState(int)</p>
<hr /><strong>setExtendedState</strong></p>
<p>public void setExtendedState(int state)</p>
<p>Sets the state of this frame. The state is represented as a bitwise mask.</p>
<p>* NORMAL<br />
Indicates that no state bits are set.<br />
* ICONIFIED<br />
* MAXIMIZED_HORIZ<br />
* MAXIMIZED_VERT<br />
* MAXIMIZED_BOTH<br />
Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.</p>
<p>Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state is available via the java.awt.Toolkit#isFrameStateSupported(int state) method.</p>
<p>Parameters:<br />
state &#8211; a bitwise mask of frame state constants<br />
Since:<br />
1.4<br />
See Also:<br />
getExtendedState(), Toolkit.isFrameStateSupported(int)</p>
<hr /><strong><br />
getState</strong></p>
<p>public int getState()</p>
<p>Gets the state of this frame (obsolete).</p>
<p>In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.</p>
<p>For compatibility with old programs this method still returns Frame.NORMAL and Frame.ICONIFIED but it only reports the iconic state of the frame, other aspects of frame state are not reported by this method.</p>
<p>Returns:<br />
Frame.NORMAL or Frame.ICONIFIED.<br />
See Also:<br />
setState(int), getExtendedState()</p>
<hr /><strong><br />
getExtendedState</strong></p>
<p>public int getExtendedState()</p>
<p>Gets the state of this frame. The state is represented as a bitwise mask.</p>
<p>* NORMAL<br />
Indicates that no state bits are set.<br />
* ICONIFIED<br />
* MAXIMIZED_HORIZ<br />
* MAXIMIZED_VERT<br />
* MAXIMIZED_BOTH<br />
Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.</p>
<p>Returns:<br />
a bitwise mask of frame state constants<br />
Since:<br />
1.4<br />
See Also:<br />
setExtendedState(int)<br />
if u want overview all the api of Frame follow the link below</p>
<p><a href="http://computerpreferedcourses.blogspot.com/2008/11/api-of-frame-class.html" target="_blank">Api of Frame</a></p>
<p><strong><em>illustrating an example on java.awt.Frame class</em></strong></p>
<p><strong><em>import java.awt.*;<br />
import java.awt.event.*;</em></strong></p>
<p><strong><em>public class AwtFrameNonResizable{<br />
public static void main(String[] args){<br />
Frame frame = new Frame(&#8220;Non Resizable Frame&#8221;);<br />
Image icon = Toolkit.getDefaultToolkit().getImage(&#8220;your pic.gif&#8221;);<br />
frame.setIconImage(icon);<br />
Label lbl = new Label(&#8220;The View of the Image. &#8220;,Label.CENTER);<br />
frame.add(lbl);<br />
frame.setResizable(false);<br />
frame.setSize(400,400);<br />
frame.setVisible(true);<br />
frame.addWindowListener(new WindowAdapter(){<br />
public void windowClosing(WindowEvent we){<br />
Frame frame = (Frame)we.getSource();<br />
frame.dispose();<br />
}<br />
});<br />
}<br />
}</em></strong></p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://www.bestjavainterviewquestions.com/converting-hibernate-with-eclipse-integration/" title="Converting Hibernate with Eclipse Integration"><img src="Array" alt="Converting Hibernate with Eclipse Integration" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/advantage-of-cookies-over-url/" title="Advantage of Cookies over URL"><img src="Array" alt="Advantage of Cookies over URL" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/define-session/" title="Define Session"><img src="Array" alt="Define Session" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/jdbc-questions/" title="JDBC Questions"><img src="Array" alt="JDBC Questions" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/configuring-the-log4j-for-hibernate/" title="Configuring the Log4J for Hibernate"><img src="Array" alt="Configuring the Log4J for Hibernate" /></a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/making-a-frame-non-resizable-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
