Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT Problem when resizing the form
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Neeraj
Problem when resizing the form
2 Answer(s)      5 years ago
Posted in : Swing AWT



Advertisement
View Answers

December 4, 2009 at 11:38 AM


Hi Friend,

Please send your code.

Thanks


December 4, 2009 at 12:17 PM


I am using a MDI application which have a menu item New which adds My New JInternalFrame form to the desktopPane. The JInternalFrame has the JTextPane which is occuping the all of the JInternalFrame form space at initial stage. at initial stage the code part for JInternalFrame Form is (which is generated by the netbeans in initcomponents):

jScrollPane1 = new javax.swing.JScrollPane();
EditorPane = new javax.swing.JTextPane();
jScrollPane1.setViewportView(EditorPane);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);

layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 790, Short.MAX_VALUE));

layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE));

pack();

At runtime when user press the button to add a new JTextPane to the JInternalFrame is:

HeadPane = new JTextPane();
HeadPane.setBounds(0, 0, EditorPane.getWidth(), 100);
HeadPane.setMaximumSize(new Dimension(EditorPane.getWidth(),100));
Container con = this.getContentPane();

con.add(HeadPane,0);
this.EditorPane.setLocation(0, 120);
con.validate();
this.revalidate();

This works proper at that time but when we maximize(resize) the internal form The EditorPane(Old) overlaps the HeadPane(new). I think this problem is occuring whenever the form repaint.

Please Help.


Related Tutorials/Questions & Answers:
Problem when resizing the form - Swing AWT
Problem when resizing the form  Hi, I am facing a problem when resizing the form. I have a JTextPane on the JInternalFrame which occupy all.... But When we resize the form, the old JTextPane moves to its initial position
New Problem in Form Resizing - Swing AWT
)); The problem is arising when the user resizes the form. The EditorPane(old...New Problem in Form Resizing  Hi, I am using a MDI application... location when the form resized. here I am using the following code: if(HeadPane
Advertisements
Resizing Height of UITextView iPhone
Resizing Height of UITextView iPhone  Hi all, Is it possible to resize the height of the UITextField in objective C
Form Processing Problem
Form Processing Problem  I am trying to create a Circular Page... to Null and //as well as the passed data from mulitpart/form-data is greater...; (contentType.indexOf("multipart/form-data") >= 0)) { DataInputStream
PROBLEM IN FORM VALIDTION
PROBLEM IN FORM VALIDTION  i applied validation IN THIS JSP PAGE.if i... the PROBLEM is that after i press OK on validation prompt,the page goes...; } </script> </head> <body> <form name="form" method="post
PHP Sticky form problem
PHP Sticky form problem  I have done the full coding of a sticky form.... Please see my coding below...and advice me what is the problem, and what...;/head> <body> <h1>Simple Calculator</h1> <form action
PHP Sticky form problem
PHP Sticky form problem  I have done the full coding of a sticky form.... Please see my coding below...and advice me what is the problem, and what...> <form action="simple_calculator.php" method="post"> <p>Number 1
print form information when click on print button
print form information when click on print button   Sir,I desingn institute webside using jsp and strut by using platform netbean 7.2.So request you please help for printing form information by clickin print button after submit
Expand / Collapse form div when click on button
Expand / Collapse form div when click on button  Hi, I have a form... formbox expand once the form gets higher? Thanks <div class="formbox...://fortwoplease.wufoo.com/forms/z7x3k7/" title="Squeeze Page" rel="nofollow">Fill out my Wufoo form
Problem in enctype="multipart/form-data" in JSP
Problem in enctype="multipart/form-data" in JSP  im using a page... the file itself when i click the submit button. im using enctype="multipart/form-data" in this form. i also using the commons-fileupload-1.2.2.jar file for getting
Null value when i set interface object in form controller - Spring
Null value when i set interface object in form controller   Hi all, i am very new about spring and hibernate. i got null value when i set.... when i call this method in form controller ohbillManager.saveBill(ohbill); i
insertin form data into databse and blank all form field when click on submit button
insertin form data into databse and blank all form field when click on submit button  sir, i useing the jsp. i want insert form data into Ms-Access database when click on submit button and blank all form field after inserting
Problem submitting a struts form containing a dojo script - Struts
Problem submitting a struts form containing a dojo script  Hello there, Is there any way to make use of dojo with struts 1 ? Actually, I'm facing a problem submitting a struts form containing a dojo script for a dynamic
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE.... 1)register.jsp <html> <form method="post" action="insert.jsp"> <
this code will be problem it display the error again send jsp for registration form
this code will be problem it display the error again send jsp for registration form  I AM ENTERING THE DETAILS OFTER IT DISPLAY THE ERROR PLEASE.... 1)register.jsp <html> <form method="post" action="insert.jsp"> <
how to check the radio button automatically depending up on the value of database when editing the form...
of database when editing the form...  hi...in my application i am editing the form and in that form the data in the database should come but icant be able... button. When the user clicks the particular radio button, that data will get shown
Problem In applet Its run on browser but hang and blinking when image is draging some where.
Problem In applet Its run on browser but hang and blinking when image.... In my applet 52 card images is draw and drage and move on the applet, but when I am draging one card, applet is refreshing and blinking continue when I am moving
i am getting the problem when i am downloading the pdf file from oracle 10g database - Struts
i am getting the problem when i am downloading the pdf file from oracle 10g... into datbase and download the pdf file from database. but when i created the pdf file... but it is not downloading .Please help to me.i am getting the below error when downloading
how to resolve the problem like when i extract the struts-blank-1.3.10.war it shows java .io.filenotfound
how to resolve the problem like when i extract the struts-blank-1.3.10.war it shows java .io.filenotfound  Hai, To Extract war file jar -xvf struts-blank-1.3.10.jar it shows the below one Microsoft Windows [Version 6.1.7600
please help me solve this problem when i am create database connection using servlecontext
please help me solve this problem when i am create database connection using... servletcontext . in this code when i login first time it will exceute sucessfully but when i use again the same page it will throw sql exception but i don't
form
form   Can I prevent a form from being submitted again
Problem
with no errors, but when running giving "java.net.connectexception connection
Problem
(); echoSocket.close(); } } this is my code, compiled with no errors, but when running giving
jQuery 'select' form event
jQuery 'select' form event In this tutorial, we will discuss about 'select ' form event to display message when we select something inside input box. In this Example, two input text box are given , when we select
jsp form
jsp form  hi sir, one got one got in jsp form after entering the data into the form the data is not saving in the database i will send you code of two forms if dnt understand my problem
dropdownbox-form - Struts
dropdownbox-form  i have a problem i was create combobox using when i select value in the value related subform will be displayed in the same form and i use that fields for database insert if any one understand my
PHP Form Part-2
Topic : HTML FORM Action Attribute Part - 2 If you noticed, in the previous... attributes. Let's understand these attributes separately : <form action="...; The action attribute is very important when you will make a website. The attribute
HTML form - Java Beginners
friend, Code to help in solving the problem : when You submit the form... (form1 and form 2)with several fields in html. When i click the submit button, it validates all fields then moves to form2. i have a problem with form navigation. i
PHP form
PHP form  Hi Sir/Madam, I am developing an attendance form using php... am adding one textfield to enter the Attendance... The problem is I am... form and update them to respective coloumn... Please any one help mo out please
Form handling
; </table> </form:form> When i run the program I am gettting...Form handling  I created a spring project. I created a jsp...;form:form name="loginForm" modelAttribute="loginForm" method="get"> <
Employee form
Employee form  In employee form emp Id id after any data iserted is incremented for oher data insertion. insert, delete, update buttons when we cleak the select buttoun then the created table data iserted automaticaly
 

 

 

DMCA.com