Mac LWJGL Display no maximization option - java

On windows, my LWJGL application is able to be maximized, as shown here:
Maximization allowed http://img28.imageshack.us/img28/8428/maximize.png
However, the same application on Mac does not allow you to maximize the display, as shown here:
http://img805.imageshack.us/img805/6653/maximization.png
Is there a line of code that I am missing?
I am able to re-size the window manually to fit the whole screen, however, it would be nice to know if it would be possible to enable the maximize button for the sake of ease.

One try would be to use the nightly builds of LWJGL found here:
https://www.newdawnsoftware.com/jenkins/view/LWJGL/job/LWJGL/
If you aren't using it already. It contains many fixes and additions, maybe even for this problem.
Otherwise the changelog from 2.8.3 just states that it got added and there is no line of code manipulating it. Do you have the same version of LWJGL on your mac?

Related

Why is my JDK11 program affected by Windows 7 personalized display setting?

I use Windows 7 and have personalized the display to zoom in to medium setting (125%), making icons on the desktop bigger etc. Now when I changed from jdk8 to jdk11 I discovered the java applications are affected by this. What's going on and how do I avoid this?
So e.g. if I just create a simple JFrame and draw an image to it the frame is bigger than it should be, and the picture looks terrible.
Java 9 introduced support for scaling in high-dpi displays: http://openjdk.java.net/jeps/263
That would explain why you see this behavior change when going from jdk8 to jdk11.
Try the suggestions in this answer: https://stackoverflow.com/a/48623068/701303
(for swing: -Dsun.java2d.uiScale=1.0; for javafx: -Dprism.allowhidpi=false)

Running a Sikuli script in multiple computers

I have a Sikuli script written in java to click the windows start button and then click "All Programs" as appear. The script works absolutely fine on my computer but when I transfer the same script to another computer, it doesn't work.
Code:
Screen screen = new Screen();
screen.type(Key.WIN);
screen.click(IMAGE_DIR + "program.PNG");
I used concepts like Wait, Pattern and similar but not able to solve this issue. Not sure if this is a limitation of sikuli.
Like was already mentioned in the comments, differences in screens resolutions will definitely ruin your existing scripts as Sikuli is super sensitive to them. In such case, the only solution is to recapture the patterns and use a different set of them on each machine.
However, if you have such issue but screens resolutions seem to be identical, there are few more things that should be checked.
Clear Type, which is Microsoft's implementation of subpixel rendering that is supposed to improve the fonts visual appearance. If you have this feature switch on on one machine and switched off on another, that might be an issue.
Smooth Edges of screen fonts setting that can be found in the "Visual Effects" settings window in "Performance Options". It does exactly what it says, smooths windows fonts to improve the looks. As in the case of ClearType, this feature should be switched off or on on both machines you run your scripts on. The general recommendation to have the always off to avoid this kind of issues.
For those still using Sikuli and experiencing inconsistency when running across different machines, it's helpful to debug on the boxes that are showing the issue.
Some things like issues around various AppData temp files not being managed correctly can show up in some PCs but not others. It's a pain to install your IDE into different places but it sometimes is the only way to really see what's going wrong - and be able to fix it.

java applet using Next-generation plug-in

I have a web application (struts 1.3, Weblogic 10.3.0, Toplink, Oracle) that has a Java applet which isn’t working in the browser (IE7/8) when the Next-Generation Plug-in setting is enabled in the Java control panel but works fine when it’s disabled. The trouble is that this setting is set to disappear in an upcoming Java release meaning that my users would have to keep using Java 1.6_xx on their workstations as they are currently. I have little influence over which version they use because they are all governed by their local IT departments across the country. So, either I have to find a simple fix to allow the Next-Generation setting to work, or we have to look at replacing/rewriting the applet with something else (but would be a last resort due to funding constraints), most likely something AJAX-friendly so as to avoid the need for a plugin. This application is quite old, written around 2001 before AJAX was really around.
The main window has a left, right, and top frame (JSP’s), as well as a center frame which is where the applet is. The applet has a main content area in the middle and a lower panel at the bottom which has some buttons. The buttons tell the content area (which is basically a treegrid) what to do (Save, Copy, change status, etc ). When I press one of the buttons the entire window (surrounding frames plus the applet itself) repeat inside the area where the applet is. It’s like a kaleidoscope or like a repeating fractal pattern kind of thing, or like when you take a picture of yourself in the mirror and you see the room repeated over and over in the mirror. In this case it repeats for each button press and the repeated set gets smaller each time. Weird!!
So, based on my research, the Java Next-Generation plugin works differently by allowing more than one process or thread whereas the classic plugin only uses a single thread. So my suspicion is that a new process is being spawned for each button press. I tried using the “separate_jvm” applet parameter but it made no difference whether it was set to true or false. I don’t see any other applet parameters which seem to be relevant.
Another idea I had is that maybe it’s something to do with the JSP frameset, maybe something like “target=_top” needs to be added somewhere…but I’m not sure how this relates to applet threads if at all.
Anyone have any suggestions, ideas or experiences that might help?
you can use velocity to handle these type of problem and it will also help you for future enhancement also.
The problem is not related to version of IE but rather to version of Java. Below excerpt from letter of certificate provider (they took it from some forum, so direct link to source cannot be provided):
For JDK version higher than 1.6.0 and below 1.6_15, you can just
clear all kinds of cache in web browser, java console and java control
panel. Then it should works fine!
For JDK version between 1.6_15 and 1.6_30, you should disable the "next-generation java" option in java control panel.
For JDK version higher than 1.6_30, you should turn on "next-generation java" option in java control panel.

Opening a JPanel form in NetBeans GUI Builder causes strange behavior

I recently tried to open a JPanel form that I created with NetBeans GUI Builder and NetBeans almost freezes up on me. The design form is an all-gray background, not the usual gray area where I can place components surrounded by a white background. If I click on the Source button and then switch back to Design view, all of the tabs in the editor pane disappear.
Fortunately I am using Git for version control. The last commit of this file was over a week ago. I might have to revert to an earlier version to see where this problem was introduced. In the mean time, does anyone have any idea what could cause this behavior? Is it possible that my .form file is corrupted? The application compiles and runs just fine.
It sounds like Netbeans can't load the form due to some internal error. This can sometimes be fixed by doing a clean & build to clear out any old cached data.
If that doesn't work, you can check out the "message.log" for the error...and yes, I wish it would display it on the screen
Off memory it use to be in "{user.profile}/.Netbeans/{version}/var/log" (I think). It got moved on Windows under 7.2 to "{user.profile}\AppData\Roaming\NetBeans\7.2\var\log"

SWT on OSX: Windows open under other applications

I'm having trouble with my SWT application where the shells/dialogs always open underneath other windows by default ("pop-under"). if I set the SWT.ON_TOP bit, the window opens properly on top, but then I block other applications, which isn't really desirable either...
I'm wondering if there's a proper way to specify that I want the window to pop-up, rather then underneath other applications.
Thanks!
I think this question is a duplicate of this SO question. What's your SWT version? It should be resolved in the latest version, as is explained there. Also see this bug report at Eclipse.org.

Categories

Resources