How to fix the size of a multiple panels in jFrame
Hi,
In Jframe I added one rootPanel
Inside rootPanel, I added two more panels
1. userInputPanel which intern contains one textField & one jLabel
2. buttonPanel which intern consists of two buttons
So I need to view, always userInputPanel top side and buttonPanel below to the userInputPanel.
But when I click on any button, the buttonPanel goes up (on top) of userInputPanel.
any solution?
Thanks
-ms_shitole
In Jframe I added one rootPanelI don't know what a rootPanel is or why you think you need to add one.
The general code should probably be something like:
frame.add(userPanel, BorderLayout.CENTER);
frame.add(buttonPanel, BorderLayout.SOUTH);
frame.pack();Read the section from the Swing tutorial on [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] for more information and working examples.
For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
Similar Messages
-
Hi Friends,
How to fix the size of JFrame so that it can not br able to resize beyond a
certain limit .
i want this because i my screen if it is resized as small then the component of screen changes there location and position.
plz help.You can... sort of
The setSize() method is nasty because you don't get the event until you release the button, so the frame resizes and then snaps back. However, if you put the ComponentListener on the frame's JRootPane, you get a stream of resize events (because the window typically needs to be able to dynamically redraw itself). You can still use the setSize() method, but it is potentially confusing to the user, because the window border gets disconnected from the cursor, and as the mouse is moved further, the frame flickers between its instantaneous new size and max size.
For a better user experience, use Robot to programmatically reposition the mouse back to the screen location equivalent to the maximum dimension. -
How to fix the size of the frame or window?
Hi,
Do you know how to fix the size of the frame or window so that the user cannot minimize or maximize it?
Thanks.Frame's setResizable(false);.
-
How to fix the size of table data in html
I want to fix the size of table data in html. ie if i want to insert only 50 char in a <td> field then it contain only 50 character, after that it switched to another line and contain the remaining character. Means <td> field wil not get automatically adjust there size according to data.
you cant specify how many characters a td cell can have but u can specify the pixel width of a td cell
<td width=50>
as long as you have wrap text on, then text will not force the box size over the 50 pixels
this wont limit it to only 50 chars though, you will probably have to use some javascript to cut the string down to size (unless youre using something like php or asp then that will do the trick too) -
How to fix the size of the column in a table of ALV table type?
Hi all,
I want o fix the size of the ALV column.
Can any one help me out regarding this.
Regards,
Yugesh* Data declarations for instantiation
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table ,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
l_value TYPE REF TO cl_salv_wd_config_table ,
* Instantiate the ALV
l_ref_cmp_usage = wd_this->wd_cpuse_usg_alv_feclm( ) ."usg_alv_feclm is the name of your usage
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL .
l_ref_cmp_usage->create_component( ) .
ENDIF .
* Get model
l_ref_interfacecontroller = wd_this->wd_cpifc_usg_alv_feclm( ).
l_value = l_ref_interfacecontroller->get_model( ) . -
Hi All,
I have an applet which internally contains JPanel. I am using border layout for that.
If size of the applet is increased, then size of this panel is being increased and the center part of the panel is getting effected(expanded).
My requirement is to increase the size of applet but keep the panel size as previous. In otherwords the increased size of applet should get added at the bottom instead of the center.
I tried with setMaximumSize() and setPreferredsize(). That didn't work for me.
Any body please help.
Regards,
Swathi.Hi,
when u adding panel in ur applet, default it can display in center(borderlayout.center), u can specify in the borderlayout-south, north..
it may be useful for ur requirement. -
How to fix the position of JInternal frames added in JFrame
Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there position. Plz reply as soon as possible. Its very urgent.
Thanks.In Jframe I added one rootPanelI don't know what a rootPanel is or why you think you need to add one.
The general code should probably be something like:
frame.add(userPanel, BorderLayout.CENTER);
frame.add(buttonPanel, BorderLayout.SOUTH);
frame.pack();Read the section from the Swing tutorial on [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] for more information and working examples.
For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area. -
How to fix the size of split container.
Hi All,
I have a requirement to display 5 alv report grid report .For this requirement i split the container into 5 rows and display the report sucessfully.
Now i need to fix size of split container's acoording to number of rows comes in alv report.Could you please let me know
how to achieve that.
Regards,
Mohithi,
Try this article..
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f1786c-a627-2e10-07b9-fefe548376ad
Regards
Rajashiva Ramalingam -
How to fix the size of a window object?
Is there any way that I could use to stop the user from resizing a window interface, and also remove the MINIMIZE and MAXIMIZE buttons up the right coner of the window ?
I don;t know about removing the min and max buttons, but you can use yourFrame.setResizable(false);
-
How to fix the decimal part(round) i.e. fix the size of float.
how to fix the decimal part(round) i.e. fix the size of float.
You can use BigDecimal to round of your number.
float f = 5.678f;
f = new BigDecimal(f).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();If you just want to display the float with a certain number of decimals, you can use java.text.DecimalFormat
DecimalFormat df = new DecumalFormat("0.00"); // two decimals
float f = 5.678f;
System.out.println(df.format(f)); // should show up as 5.68 -
Within redbox I can not click on a movie and get information about it, instead I get an error message that says that the situation may be temporary. yet i keep having the same problem. Do you have any idea how to fix the problem?
Did you delete all receipts with iDVD in the file name with either a .PKG or .BOM extension that reside in the HD/Library/Receipts folder and from the /var/db/receipts/ folder before installing the new copy? If not then do so and delete the new application also.
Click to view full size
Then install iPhoto from the disk it came on originally and apply all necessary updaters: Apple - Support - Downloads
OT -
How to determine the size of selected text
Hi
I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text. The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position. Any ideas?You may have to do some testing of your own with this… I tested here and 'think' its OK but could have overlooked something… For me the best way to get this data is to outline the type store the info in a variable then undo the outlining process… You can then continue your script with info in hand… An example that draws a box over each selected character… I cheated with only the one text frame but you can resolve that? You could easy use math.min & math.max to draw around an array of bounds… I didn't bother with a load of tests it expects selected text range as is… have fun…
#target Illustrator
textBoxer();
function textBoxer() {
var i, doc, sel, start, end, spaceB4, spaceInc, mat, grp, count, boxes;
doc = app.activeDocument;
sel = doc.selection;
start = sel.characterOffset-1; // Not zero based…
end = start + sel.length;
doc.selection = null;
spaceB4 = doc.textFrames[0].contents.substr( 0, start ); // Cheated here you will need to find parent frame…
mat = spaceB4.match( /\s/g ); // Resolve the lost of white space characters before selection
mat != null ? spaceB4 = mat.length : spaceB4 = 0;
spaceInc = doc.textFrames[0].contents.substr( 0, end ); // Here too…
mat = spaceInc.match( /\s/g ); // Resolve the lost of white space characters in selection
mat != null ? spaceInc = mat.length : spaceInc = 0;
grp = doc.textFrames[0].createOutline(); // Items in new group are last to first order
app.redraw();
count = grp.compoundPathItems.length;
boxes = Array();
for ( i = 0; i < count; i++ ) {
boxes.push( grp.compoundPathItems[i].visibleBounds );
boxes.reverse(); // Fix the order
app.undo(); // Bounce back…
app.redraw();
start = start - spaceB4;
end = end - spaceInc;
for ( i = start; i < end; i++ ) {
doc.pathItems.rectangle( boxes[i][1], boxes[i][0], boxes[i][2]-boxes[i][0], -boxes[i][3]- -boxes[i][1], false );
app.redraw(); -
How to reduce the size of icons and descriptions of pallets?
Hi!
1. The "Control bar" is still something missing and to display the location of the same functions are different depending on the selected tool.
Therefore, the tools will I need to keep an eye on pallets or icons. But description of the pallets is too great for me, takes place and I can not see as many pallets as I need.
2. The idea to create multiple workspace and its continuous change is not good for me.
When I work I prefer to have the tools at its one location, then I can rely on My reflexes when choosing a tool, and not constantly look where this time or constantly switch the workspace.
3. How to reduce the size of icons and descriptions of pallets I, then he could fit more pallets in one column?
Best Regards!Hi Monika,
Nice to read you again. Thank you for your response.
Yes, I read. It does not solve the problem about which I write. I guess that solves your opinion? Please hint. -
I can't send mail from my iPad apps, I just get the error message, 'The recipient… was rejected by the server because it does not allow relaying.' Does anyone know what this means and how to fix the problem.
iOS: Unable to send or receive email
http://support.apple.com/kb/TS3899
Can’t Send Emails on iPad – Troubleshooting Steps
http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
Setting up and troubleshooting Mail
http://www.apple.com/support/ipad/assistant/mail/
Using a POP account with multiple devices
http://support.apple.com/kb/ht3228
iOS: Adding an email account
http://support.apple.com/kb/HT4810
iOS: Setting up an Outlook.com, Hotmail, Live, or MSN email account
http://support.apple.com/kb/ht1694
Server does not allow relaying email error, fix
http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
Why Does My iPad Say "Cannot Connect to Server"?
http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
How to Sync Contacts with Your iPad Using iTunes
http://www.dummies.com/how-to/content/how-to-sync-contacts-with-your-ipad-using- itunes.html
iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
http://support.apple.com/kb/ts2621
eMail Groups - You can use a third party app that many users recommend.
MailShot - https://itunes.apple.com/us/app/mailshot-pro-group-email-done/id445996226?mt=8
Group Email - https://itunes.apple.com/us/app/group-email!-mail-client-attachments/id380690305 ?mt=8
iPad Mail
http://www.apple.com/support/ipad/mail/
Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts Tap on the Account, then on the red button that says Remove Account.
Cheers, Tom -
How to calculate the size of DB given the transaction and the INVT
Hi,
I need to know the size of a database
transactions/day-900
Total Items=12,200
We are preparing for a proposal .The above is the descriptions given by the client.
How to estimate the size of database We need to design a hardware configuration
Can anyone help me
Maran.Any clue regarding the size of the row in the 900 transactions per day?
Will there be a single table updated per transaction or multiple tables?
Will the transaction be of type insert mostly?
If it is going to be insert only, then probably you can estimate the database size based on size of row * 900 transactions per day... You need to consider if there will be other tables affected via triggers.
Also, the size of the indexes defined on these tables will contribute to the database size.
No idea as to what do you mean by 12,200 items.
Message was edited by:
satishkandi
Maybe you are looking for
-
I am unable to open any pdf files because I have not accepted the end user licensing agreement for adobe reader. I can not find the accept button. I have a mac.
-
Long-time start up and batteri charge problem?
Hi, I bought the new Mac-air 2014 (11 inch) yesterday. It seem have problem: the start up time is quite long up to around 20s. The battery reduce quite fast about 5 hour and I charged for one night, but the battery increased only 20% (Mac still worki
-
How to archive and purge enormous tables
Hi, I have two tables A and B A has 28 028 808 lines B has 70 000 000 lines I would like to archive about 96% of each of the two tables. So, I would like to copy the selected lines into new tables A2 and B2 and delete the corresponding lines from tab
-
Split R3 table's records into detailed set of records for extracting to BI
Hello, everybody, In R3 table i have records: <i>Document_numberA-Material_numberA-Date1-Date2-Date3-Amount1-Amount2---Amount3</i> I have extract data to BI ODS in format: <i>Document_numberA-Material_numberA-Date1---Amount1 Document_numberA-Material
-
V$services with id zero
Hi I follow this [link |http://www.pafumi.net/Standby_Concepts_Configuration.html#Process_Architecture_] and try to practiced with DATA GUARD. After done all the section and have primery db and standby db I wont to test it . But it not work !!!! Tryi