window-resize

Java window contents resize, but not beyond a minimum size

℡╲_俬逩灬. 提交于 2019-11-28 10:08:29
问题 I have a Java apps I've written using NetBeans (yes, I've read plenty of complaints here about NetBeans). When I resize the window, the contents resize with the window, until I shrink the window (the height, actually) below a certain size. Then the window resizes, but the contents just get clipped. I've checked all of the component widgets. They all have min sizes of zero or very small numbers. The only ones with nonzero preferred sizes are those that do not resize with their parents, and

Why does the size of the JFrame exceed the size of its ContentPane, even though it has a defined size?

我的未来我决定 提交于 2019-11-28 09:45:46
问题 I noticed a strange behavior between containers in the swing. To exemplify the test, I created a JFrame and a JPanel, and set the panel as contentPane. I defined the preferred and maximum JPanel size to 400,300. All this can be seen in the example below: import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; public class ExcessiveSpacePanelTest { JFrame frame; JPanel panel; public

Javascript set browser window size

别说谁变了你拦得住时间么 提交于 2019-11-28 08:24:14
What is the best way to set the size of the browser window when the page loads? I think this can be done in JavaScript. Please explain. Here is my code that is not working! <html> <body onload="window.resizeTo(640,480)"> <video src="rushmore.mp4" controls="controls"> your browser does not support the video tag </video> </body> </html> I put this in an answer as the comment became to long. The only thing that I have found that is close to the resizing of the chrome window is to use a chrome extension that can resize the window. The actual extension command is chrome.windows.update(...) . Take a

Min width in window resizing

☆樱花仙子☆ 提交于 2019-11-28 04:56:05
I have a webpage with a fluid layout with a 100% width. When I resize browser window the elements in the page overlap. I would create an effect similar to this website http://bologna.bakeca.it/ that when window is smaller than a fixed width stop resizing. Chinmayee G You can set min-width property of CSS for body tag. Since this property is not supported by IE6, you can write like: body{ min-width:1000px; /* Suppose you want minimum width of 1000px */ width: auto !important; /* Firefox will set width as auto */ width:1000px; /* As IE6 ignores !important it will set width as 1000px; */ } Or:

How to fix borderless form resize with controls on borders of the form?

微笑、不失礼 提交于 2019-11-28 00:27:29
I have a borderless winForm which I needed to resize, and I managed to do it this way: protected override void WndProc(ref Message m) { const int wmNcHitTest = 0x84; const int htLeft = 10; const int htRight = 11; const int htTop = 12; const int htTopLeft = 13; const int htTopRight = 14; const int htBottom = 15; const int htBottomLeft = 16; const int htBottomRight = 17; if (m.Msg == wmNcHitTest) { Console.Write(true + "\n"); int x = (int)(m.LParam.ToInt64() & 0xFFFF); int y = (int)((m.LParam.ToInt64() & 0xFFFF0000) >> 16); Point pt = PointToClient(new Point(x, y)); Size clientSize = ClientSize;

Custom Resize Handle in Border-less Form C#

自古美人都是妖i 提交于 2019-11-27 14:22:22
I'm attempting to make border-less forms that pop out of a tool bar. I want the user to be able to grab at the bottom-right corner (a "resize handle") and be able to resize the form, but not be able to resize or reposition the form in any other way. I've heard that I can intercept the WM_NCHITTEST message sent to the form and set its result to HTBOTTOMRIGHT which will let the operating system handle the re-sizing of the form, just as if it had a sizable frame. The idea I had was to detect if the mouse pointer had entered a box I defined in the corner and if it did then return the HTBOTTOMRIGHT

Javascript set browser window size

痴心易碎 提交于 2019-11-27 02:12:35
问题 What is the best way to set the size of the browser window when the page loads? I think this can be done in JavaScript. Please explain. Here is my code that is not working! <html> <body onload="window.resizeTo(640,480)"> <video src="rushmore.mp4" controls="controls"> your browser does not support the video tag </video> </body> </html> 回答1: I put this in an answer as the comment became to long. The only thing that I have found that is close to the resizing of the chrome window is to use a

Disable Browser Window Resize

我的未来我决定 提交于 2019-11-27 01:11:16
For starters... I have no sinister intention of subjecting users to popups or anything like that. I simply want to prevent a user from resizing the browser window of a webpage to which they've already navigated (meaning I don't have access to / don't want to use window.open();). I've been researching this for quite a while and can't seem to find a straightforward answer. I felt like I was on track with something along the lines of: $(window).resize(function() { var wWidth = window.width, wHeight = window.height; window.resizeBy(wWidth, wHeight); }); ...to no avail. I have to imagine this is

Min width in window resizing

懵懂的女人 提交于 2019-11-27 00:43:19
问题 I have a webpage with a fluid layout with a 100% width. When I resize browser window the elements in the page overlap. I would create an effect similar to this website http://bologna.bakeca.it/ that when window is smaller than a fixed width stop resizing. 回答1: You can set min-width property of CSS for body tag. Since this property is not supported by IE6, you can write like: body{ min-width:1000px; /* Suppose you want minimum width of 1000px */ width: auto !important; /* Firefox will set

How to fix borderless form resize with controls on borders of the form?

南笙酒味 提交于 2019-11-26 21:42:11
问题 I have a borderless winForm which I needed to resize, and I managed to do it this way: protected override void WndProc(ref Message m) { const int wmNcHitTest = 0x84; const int htLeft = 10; const int htRight = 11; const int htTop = 12; const int htTopLeft = 13; const int htTopRight = 14; const int htBottom = 15; const int htBottomLeft = 16; const int htBottomRight = 17; if (m.Msg == wmNcHitTest) { Console.Write(true + "\n"); int x = (int)(m.LParam.ToInt64() & 0xFFFF); int y = (int)((m.LParam