Problem when resizing the form

Problem when resizing the form

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
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
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
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
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
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
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
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
ModuleNotFoundError: No module named 'auto-resizing-text-edit'
ModuleNotFoundError: No module named 'auto-resizing-text-edit'  Hi...: No module named 'auto-resizing-text-edit' How to remove the ModuleNotFoundError: No module named 'auto-resizing-text-edit' error? Thanks   
ModuleNotFoundError: No module named 'auto-resizing-text-edit'
ModuleNotFoundError: No module named 'auto-resizing-text-edit'  Hi...: No module named 'auto-resizing-text-edit' How to remove the ModuleNotFoundError: No module named 'auto-resizing-text-edit' error? Thanks   
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"> <
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
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
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
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
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
problem in onlinetest...
problem in onlinetest...  hi, my code getting the problem is ,when user leave a question then the server puts error... pls help me
Problem in enctype=
Problem in enctype=  im using a page which is in JSP. i have some text boxes and one upload button. i want to load the file itself when i click the submit button. im using enctype="multipart/form-data" in this form. i also using
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
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
PHP Form Part-2
Topic : HTML FORM Action Attribute Part - 2 If you noticed, in the previous... attributes. Let's understand these attributes separately :ADS_TO_REPLACE_1 <form... of this tutorial.   The action attribute is very important when you will make a website
Login form using Jsp in hibernate - Hibernate
To hibernate, I'm facing problem in My project(JSP with hibernate).. My login form is working but the problem is ,when i enter correct user name and password... and entering into Menu Form.. plz can any one help for my problem... Thanks
jsp problem
jsp problem  problem:::::::: On JSP form ,when i insert data in text... and get assign to other field on that form........ when data is assign to other field on that form at that time firstly inserted data is not present on that form
uploading problem
. then problem solved... bt real problem is when i upload files fusing mozilla...;font size="+3" color="white"> <TABLE> <tr><td><form...; <TABLE> <TR><TD><form name="form2" action
logout problem
me out of this... the problem is -- when i logout , the user goes to logout.jsp (as simple), but when he presses back button , he again sees the page , where he has come from .. please get me out of this problem thanks.   Use
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
problem in forwarding response
problem in forwarding response  My response is not getting displayed... is shown.Actually Control is not going to any page.I have even tried to submit the form using... displays all records present in table and when user clicks on edit button
when refreshing the page the data is stored in data base again
when refreshing the page the data is stored in data base again  Hi, In my application, I am adding form data in database on click of submit button.But the problem is, when user refreshes the page, the data added one more time
other form
other form  Can I write this code in other form: if (quantity>=5) { System.out.println("Congrats!! You get a discount of 5%."); } else { System.out.println("you can avail a discount of 5% when you make a purchase of 5 items
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
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"> <
problem:struts code - Struts
problem:struts code  Hi, Am using struts1.2.I wrote a form(dynavalidator form)with validation after completing the form if we press submit its call the action class,in action class i gave forward to same form,the problem is if i
dynamic form
dynamic form  I need to make a dynamic form using php, for example, i will need a list of items which when we select one option another list... button wich once clicked we have a new list created on the same form. Thank you
InputSecret field becomes empty when page is reloaded
InputSecret field becomes empty when page is reloaded  How to fix the problem when h:inputSecret field becomes empty when page is reloaded
PROBLEM IDENTIFICATION
PROBLEM IDENTIFICATION  class MOrders { int nooforders; // Data members of the class public int getorder() { nooforders = 500; } public void... (); obj.getorder(); obj.displayorders(); } } when this code is compliled it shows
resolution problem in java
resolution problem in java  I designed project in java in my PC when run the same project in some other PC i can't fully view my java forms.Some said that it is resolution problem
Ajax form element - Ajax
Ajax form element  I have problem in passing a value into form feild using ajax. I want to get the value is as a parameter. Can some one help me plz
jsp problem - JSP-Servlet
through jsp. but i cann't set size of image when it was display so what should i do?? when the image retrieve from the database i want to set its size to how... me abt it, here is code for both insert and retrieve image form database and its
jsp problem - JSP-Servlet
through jsp. but i cann't set size of image when it was display so what should i do?? when the image retrieve from the database i want to set its size to how... me abt it, here is code for both insert and retrieve image form database and its

Ads