Sorry, but I don't quite get your English. I'm trying my best, though. The way I understand it is that when you set frame.setResizable() to false, it doesn't do it properly. Do I understand that correctly? If not, tell me what you want to disable.
Regardless of whether you want to make the button hidden, or just to stop it from working, it requires complex knowledge of JInternalFrame, with which I cannot help you with.
You can however, perhaps re-ask the question, asking how to make use of this:
JInternalFrame.setMaximizable(false), and hopefully someone will help you out with this.
Believe me, I'd help out if I had the ability to, but I don't.
About that, vk, that's not quite what he's looking for. He wants the realizability, but he does not want the sketch to maximize, so setting frame.setResizable to false, won't work. In addition to that, setting it to false, once you try the setSize function, it resizes the window, but doesn't resize the sketch.
But coming back to your question of removing maximize button: it seems to little juice for too much of a squeeze. What's wrong with having maximize button if you're ok to resize the sketch? Another issue is that: i am not sure that sketches will run well if you resize them? Has anyone worked enough with resizable sketches?
I myself have worked quite a bit with resizeable sketches, and the only problem I've seen with resizing a sketch is that it won't update while dragging the edges. I can go into further detail, but that's not necessary.
And when it enlarged by resizing: is it that the image is simply stretched (and sketch.width and height are still from the original size)? or do these parameters change?
If you look in the others answers, not the marked, there is some codes, but is said that this is not possible with a jFrame only with a jDialog there are some codes there, but not for processing.
During the resizing of the sketch window, the sketch itself is just paused. Then, when you let go, it will continue from there.
And when it enlarged by resizing: is it that the image is simply stretched (and sketch.width and height are still from the original size)? or do these parameters change?
That entirely depends on the way you code your visual resources. Say, if you had an image that was 400 by 300 pixels. If you write: image(yourImage, x, y), the image will stay the same size as the original image. But, if you write: image(yourImage, x, y, width, height), the image will be resiazed according to the sketch size.
Unless that's all you want to know, I recommend you make your own post with all your questions on resizing, just so you don't "sabotage" the post.
Answers
Do you mean that you want to make a maximize button as well?
no. button just want to disable it, because to apply this frame.setResizable (true), the button is enabled.
if I put in false, frame.setResizable (false) disables the button is, but it does not work well the GUI
Sorry, but I don't quite get your English. I'm trying my best, though. The way I understand it is that when you set frame.setResizable() to false, it doesn't do it properly. Do I understand that correctly? If not, tell me what you want to disable.
as disable, maximize button?
Oh hang on a second. You want to disable the maximize button, while still being able to resize the screen. Is that what you're after?
=D> yes.
anna ¿¿ :)]
@anna2013 was a spam account that has been deleted.
Regardless of whether you want to make the button hidden, or just to stop it from working, it requires complex knowledge of JInternalFrame, with which I cannot help you with.
You can however, perhaps re-ask the question, asking how to make use of this: JInternalFrame.setMaximizable(false), and hopefully someone will help you out with this.
Believe me, I'd help out if I had the ability to, but I don't.
Best of luck.
-- MenteCode
:o3 LOL
then what is the function to maximize button???
for example, exit button, the function is void exit () {}.
I found this in stack overflow http://stackoverflow.com/questions/5625436/how-can-i-remove-just-the-maximize-button-from-a-jframe
About that, vk, that's not quite what he's looking for. He wants the realizability, but he does not want the sketch to maximize, so setting frame.setResizable to false, won't work. In addition to that, setting it to false, once you try the setSize function, it resizes the window, but doesn't resize the sketch.
And to answer your question, Omnimusha, just because exit() exists, doesn't mean that there's a function for every button.
But before you go any further, I've searched a bit more, a found something that might help. Just wait a bit so I can experiment.
when you have "overridden" the exit function: void exit () {
you have actually now broken the processing code. Now your sketches will not exit with the exit() method.
Also documentation of exit() doesn't say that it is called WHEN the sketch is exiting. It only says to call it TO exit the sketch.
You cannot be sure that exit() is called EVERY time sketch is stopping. It may be called sometimes. But there's no guarantee.
There's also a whole discussion on the case of stoping sketch:
http://forum.processing.org/one/topic/run-code-on-exit.html
But coming back to your question of removing maximize button: it seems to little juice for too much of a squeeze. What's wrong with having maximize button if you're ok to resize the sketch? Another issue is that: i am not sure that sketches will run well if you resize them? Has anyone worked enough with resizable sketches?
I myself have worked quite a bit with resizeable sketches, and the only problem I've seen with resizing a sketch is that it won't update while dragging the edges. I can go into further detail, but that's not necessary.
Now, back to the question? I have not figured out a way to make this seamless yet, but you can use these lines of code in void draw():
I'm still experimenting, though. Don't you worry.
But is sketch restarted when it is resized?
And when it enlarged by resizing: is it that the image is simply stretched (and sketch.width and height are still from the original size)? or do these parameters change?
If you look in the others answers, not the marked, there is some codes, but is said that this is not possible with a jFrame only with a jDialog there are some codes there, but not for processing.
During the resizing of the sketch window, the sketch itself is just paused. Then, when you let go, it will continue from there.
That entirely depends on the way you code your visual resources. Say, if you had an image that was 400 by 300 pixels. If you write: image(yourImage, x, y), the image will stay the same size as the original image. But, if you write: image(yourImage, x, y, width, height), the image will be resiazed according to the sketch size.
Unless that's all you want to know, I recommend you make your own post with all your questions on resizing, just so you don't "sabotage" the post.
-- MenteCode
LOL 8-}
! MenteCode great job. ....... but behaves strangely the gui
Image
I'm guessing that after a few tests, you can't close the sketch. In fact you can't do anything in the sketch...
That's what I meant when I said it wasn't seamless yet. Working on it. ;)
Tests = clicks.
So, after quite a bit of research, I still haven't found another way of disabling the button, so that's probably the best you can get it.
Unless you don't mind NOT having the menu bar, and making your own buttons...
-- MenteCode
no problem, I prefer the previous solution.
from already thank you very much
Greetings!
if you have problems with your gui (the way the app looks) after adding:
surface.setResizable(false);
make sure you aren't using OPENGL
//size(1280, 720, OPENGL);
size(1280, 720);