I'm trying to make javaFX virtual keyboard work for touch screen. All goes good in Netbeans.
I put this in Project->Properties->Run->VM Options:
-Dcom.sun.javafx.isEmbedded=true
-Dcom.sun.javafx.touch=true
-Dcom.sun.javafx.virtualKeyboard=javafx
When I run the program in Netbeans, the keyboard shows up, when I click in a textField it's working...all good.
The problem is when I build the application and I run the .jar from the dist folder, no more keyboard...
Any idea? Thank you!!!
You can pass the parameters in the main function.
System.setProperty("com.sun.javafx.isEmbedded", "true");
System.setProperty("com.sun.javafx.touch", "true");
System.setProperty("com.sun.javafx.virtualKeyboard", "javafx");
Related
When I run my application, it does not display the same button as scenebuilder does.
Scenebuilder Screenshot
MyApp Screenshot
I naturally saved the files and tried to restart, to no avail.
I use IntelliJ but I've been following a tutorial using the same IDE as I do, so there should be no issue about it.
Help would be much appreciated, folks.
Thank you :)
It's really getting annoying and tiresome when I'm working really hard on something I need to complete and then I need to make a few changes to the GUI so I open Scene Builder and it doesn't open up.
I've tried
- Closing Eclipse and opening it.
- Killing the scene builder process and opening it.
What works
- Logging off and logging on and then opening eclipse & the scene builder.
This is starting to make me lose taste in JavaFX. Though I have to use this over Swing.
Also, when I open Scene Builder (from my desktop) it opens up just fine, though when I navigate to my Main.FXML (inside my project). Scene Builder can't be opened. It just does nothing when I open it, and it minimizes.
Even though this question has been asked some time ago, I want to contribute my solution to this problem because it differs from the other solutions and in addition is very simple.
This particular problem happened to me just a few mins ago and all I took to solve was maximizing the actual Scenebuilder window!
Open the Windows Taskmanager
Switch to the applications tab
Right click the SceneBuilder (named: yourFileName.fxml)
Select 'Maximize'
Description above works for Windows OS, on other OS the corresponding application managing program should do the same.
That worked for me just perfect. No copying and/or overwriting needed.
Its not the perfect answer but it works well. Try doing the following
1.Open scene builder directly from your local drive.
2.Click on File-> Open Recent -> Clear Menu
Then try to open up your fxml.
Works fine for me.
I am having the same problem. It appears that either SceneBuilder or IntelliJ IDEA put my FXML file in a state that Scenebuilder can't parse.
You may find it helpful to edit the logging.properties file and reopen the bad FXML file. On windows it's %ProgramFiles(x86)%\Oracle\JavaFX Scene Builder 2.0\app\logging.properties. You can set
.level = ALL
Then examine the file %TEMP%\scenebuilder-2.0.log for clues.
Valid java.util.Logging levels in descending order are:
OFF
SEVERE
WARNING
INFO
CONFIG
FINE
FINER
FINEST
ALL
Also, copy the FXML file to a temp dir. Try to open it there. I did that and it appears to have fixed the problem.
For me, copying the code from the .fxml file that didnt work with scenebuilder to a new (!) .fxml file on lets just say the desktop and then opening that one worked. After I opened the new file I saved and overwrote it back to where it was in my source folder, and it worked just fine from there on.
Open scene builder directly from your local drive.
Click on File-> Open Recent -> Clear Menu
this also works for me, try this
I made a game using LWJGL and i need to be able to open it with a runnble jar.
the game contain another jar of program i made that let you build maps for the game so in the
game i can click on a button and the builder opens.
i tried to use jarsplice and i managed to open the jar of my game and see the main menu
however when i click on the button that open the game itself or the map builder the program
just crushed..
I have no idea what to do.... hope you can help me with that.
thanks.
Okay it looks like you need to debug the problem. Here is how I would do it:
Make the runnable fat jar using jarsplice
Put it in a new folder
Also in that folder create a file called run.bat
Edit run.bat with notepad++ (or another text editor) and paste this code into it
java -jar jarname.jar
PAUSE
Obviously replace jarname.jar with the name of your fat jar
Now when you run run.bat and you trigger the error you should be able to see the stack trace! If you can't solve the problem from that then post it here and I'll have a go at it.
Sorry that this isn't actually an answer, but it would be too hard to read if it was a comment.
I'm trying to get my Qt application to display an icon in the Unity Launcher but it's not working. In code, I'm simply using:
qApp->setWindowIcon(QIcon("path/to/icon.png"));
but it's not doing anything. I've also tried setting the icon directly on the main window but it doesn't help either.
Any idea what could be the issue?
PS: I've checked the icon path and it is correct.
Without knowing the details of unity, I'm pretty sure that you'll have to create and install a .desktop file with the icon in it. See for example here. Whatever you set at runtime, the launcher cannot know about before starting the application, so it will need the information from an external configuration.
To enable picture encoding in Windows(not in Ubuntu) I've put the QT\4.8.3\plugins\imageformats folder near my app.
I think You should try the same.
I recently had a problem with the Issue Tracker starter kit that seemed to be resolved by using the "build" option. Previously, I would typically use the "play" button to debug my app, then just stage the files when everything was working, assuming that the last time I hit the "play" button, it had fully compiled the app.
Anyhow, I'm wondering if there's a difference between the "play" button and the "build" menu option? if so, what are the differences?
The "build" button compiles your website while the "play" button builds and fires up a browser with the default page as an argument.
The "play" button is designed to execute a assembly that is designated in your solution as a starting point. Since an ASP.NET website has no true "entry point" (like static void Main() in a console application) the "play" button simulates a similar action by opening the browser to your projects "start page".
Play button (F5) executes your application in debug mode.
Build menu is only compiles and produces your assemblies.
And one another option, CTRL + F5, it runs your application but not in debug mode.
The downside of "play" with a WebSite project is that you might miss a compiler error if the offending code is outside of the App_Code directory and you don't ever load the code that contains the error. I think doing a "build" does catch those kinds of errors.
Another gotcha to watch out for--if there are additional projects (such as class libraries) within the solution, make sure that the dependencies are set up correctly in the Configuration Manager so that those projects are built before "playing" the site. Otherwise you could make a change in the class library and then "play" the site but not see the change.