JcomboBox has no border? - java

When my program starts up, the comboboxes (there are 2 that are having this problem) do show up. However, when I click on the arrow one item (there should be 7 items showing) shows up and there is no border around the list. If I drag my mouse over the area all the other items appear, but still no border.
This is only happening at our warehouse which is about 400 yards from the main office. We have fiber going over there and are on the same LAN. I'm not sure if this is a network issue or a java issue.
Any help is very much appreciated.
Chris

I remotely logged into the computer this morning to try this out for myself, with different versions of the package (one that was built using 1.4.1_18 and one with 1.4.1_15). Turns out that if I minimized the program and then maximized it, everything was fine (using both versions).
I commented out setExtendedState(getExtendedState() | MAXIMIZED_BOTH) which comes after everything is initialized for the frame. Rebuilt, restarted and the borders are there along with all the items, so it now works perfectly.
Does anyone know why this would be causing a problem?

Related

Eclipse runs javafx program with weird settings / weird screen / or misalignment

On two different laptops, when I run my javafx application on eclipse-- the background and objects that is loaded onto the screen is not where they are suppose to be positioned. For example, the ImageView background is supposed to be centered and fill the screen, but instead it appears immediately to the bottom-right. Only when I resize the screen (doesn't matter how big) but the background and objects automatically reposition themselves where they should be. I believe a possible cause is my eclipse settings, except they're all defaulted. I don't think it's something wrong with my code, because when I run the same code, the same program on a different desktop and on another laptop, everything appears as it should. I tried changing my screen resolution but that has no effect. I also tried changing using css to set and position my background but same results.
Has anyone had a similar problem or have any suggestions to fix this?
Please help! Thank you.

Running Eclipse on HP 14 Chromebook with crouton and xfce. When ever I enter in Eclipse screen turns black

Ok, so I am a standing at the beginning on my relationship to linux and spend the last couple of days to get Eclipse running on my Chromebook using crouton.
Now I ran into this really weird problem:
When ever I start Eclipse everything works fine. I open my new project and Class and want to begin my long journey of finally really learning Java.
Typing works fine but as soon as I hit enter my screen turns black.
I can resolve this issue by switching back to my ChromeOS and back to XFCE again. Pressing enter again however turns my screen black again.
This usually happens 2-3 times. After that it works fine as far as I can tell. Hitting backspace has a similar effect but in reverse. It works fine until i hit a certain point. Typing while the screen is black works fine btw..
What can that be? I'm happy to try and provide pretty much everything you need to help me fix this issue.
UPDATE:
I just found out that when i press the little minus or plus symbol to collapse or expand lines it also goes black. Maybe thats a vital clue?
Eclipse uses SWT which poorly integrates with GTK. Try running eclipse with SWT_GTK3=0 in environment.

Misaligned Screen in JCEF (Java Chromium Embedded Framework) Application

I have a Java 7 application which is using Java Chromium Embedded Framework to draw html/css into two windows it launches. This works quite well in 4 of 5 PCs that I've run it on. In one case there are alignment issues with the rendered html. Successful runs include Windows 7/8/8.1. Unsuccessful run is 8.1 on an HP TouchSmart Envy, straight out of the box. Perhaps the only distinguishable differences are that this PC is new and that it has a touch screen.
As you can see, the content is shifted upward while being additionally clipped at the right and bottom sides. This is true of both windows that the application opens. What's even stranger is that mouse events (such as the :hover effects on the buttons and click events) are received in their correct position -- clicking about two inches below "Start Presentation" fires the button's click event.
Frankly, I have no idea what to try next on this. I've tried installing and uninstalling graphics-related software, adjusting the screen resolution, adding and removing the second screen, restarting the pc, and updating the onboard graphics driver.
As I have no idea what else could be causing this inconsistency, any advice in troubleshooting this issue would be fantastic.
As it turns out, this appeared to be related to the way JCEF interacts with system drivers. Going through Windows Update for the first time, restarting, and returning to the device's native resolution solved this issue.

Blank but still somewhat working user interface

I've written a Java database program using Swing, and it looks and works fine on my Windows machine. I was expecting to be able to transfer it to my Linux (CentOS 6) machine with no problems, and while it compiles and runs just fine, the GUI is blank.
Specifically, a JDialog that I show appears as a solid grey rectangle, but I can still see my cursor change to an I bar when I hover over the text boxes, and I can type into them and press the invisible Ok button, and it works. (This is a database login dialog.)
Then, a JFrame that I've setup as an MDI parent is displayed, but it has zero size. If I drag it open it does have a border, but it does not visibly have the menu that I placed on it. I don't seem to be able to access the menu invisibly as I was able to on the JDialog.
I suspect that this must have something to do with some Java or library version, but I'm not sure. I tried installing Java 7 but it didn't change anything. I'm not sure if I should uninstall Java completely and try reinstalling it, or if maybe it has something to do with the project instead (I am using Eclipse Kepler if that helps.)
I see a few other "Java program is blank" questions, but they either do not have answers or are not the same issue I am having. (My program is only blank under CentOS so far; it works and looks just fine under Windows.)
I narrowed it down to a single line. In the JDialog I had the following:
setType(Type.POPUP);
as soon as I removed this line, the dialog became visible.
Additionally, I find that if I use the Test/Preview... feature (this is using the WindowBuilder) when that line is present, it shows the dialog blank, but it is non-interactive and effectively hangs Eclipse. This led me to "end-task" java.exe, which did unfreeze Eclipse, but it ended up causing even more problems, including the ones I was having with my MDI JFrame.
After rebooting, and removing the above POPUP line, everything is working great.

Java 6, JFrame stuck alwaysontop

This issue only seems to occur since I upgraded from 1.5 to 1.6
The main JFrame, randomly seems to get stuck infront of every other application in windows.
Even another JDialog popping up set to alwaysontop(true) will be behind this main JFrame.
Any ideas on what could be causing this issue? / Any ideas for solutions?
Never had this issue before on Java 5.
Sorry guys it seems it was a program used as a screen splicer that was causing an issue with th Java program. Once the screen splicer was uninstalled, the issue has not occured.
I also have this issue for a long time now and was able to reproduce it.
While a modal always-on-top dialog is open in front of the frame, click the frame. The frame inherits the always-on-top behaviour, even if it is not set to stay on top.
I found an article about this behaviour here.
The simple solution: Dialogs must not be modal and always on top at the same time. Modalarity already includes an always-on-top-behaviour.

Categories