colin shuker

Ranch Hand
+ Follow
since Apr 11, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
17
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by colin shuker

Hi,

When I use 2 monitors(they are both HDMI 1920x1080 asus monitors), with my javafx app (that is a small window that sits on the 1st monitor only),
the animation runs at 60fps but is often quite jerky at times, especially as it is first run, or when other windows are in focus.

But now that I unplug one of my monitors , the animation is a nice 60fps and never jerky, it appears perfect regardless if other windows are open.

Its a bit of a weird issue, but is there anything I could try so its consistently smooth when both monitors are plugged in.
I'm running a GTX580 1.5G, with an i5 2500K@4.5GHz and 16G ram.

Thanks for any advice.
9 years ago
Okay, I don't really get the thing with the classpath exactly.
9 years ago
Thanks for replies,

I need jar files for the those logging things don't I?

For some reason when I jar a project that has jars added, sometimes the jar runs fine on my pc, but not on others computers.
Something to do with not being able to find those classes, I don't get why it works on one pc, but not another, so would rather avoid that from happening.
9 years ago
Hi,

I have currently have a class with some tools in.
The class is called O, and has the method:


Allowing me to just write O.p("Hello World"); for example.

What I would like to do is make a similar method that displays the class name.
For example, in the class Main, calling O.p("Hello World"); should output "Main: Hello World"

I'm not sure if theres a simple solution for this, but it would help me in debugging as I have quite a few classes in my programs.

Thanks for any help
9 years ago
Thanks...

I already read that post, I only a few days ago installed the latest java8 jdk on my tablet, so I guess it hasn't been fixed.

I tried to catch the exception inside the touch listeners I implemented, but I guess it doesn't quite work that way.
9 years ago
Hi, I am using javafx with TouchEvents (on a windows 8 tablet),

There seems to be a bug, in the java code relating to too many touch points.
It makes my application unusable once it happens, as any further touches on the screen make the same exception show up in the output, it is shown below:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: Too many touch points reported
at javafx.scene.Scene$ScenePeerListener.touchEventNext(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleNextTouchEvent$346(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$174/32038969.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleNextTouchEvent(Unknown Source)
at com.sun.glass.ui.View.handleNextTouchEvent(Unknown Source)
at com.sun.glass.ui.View.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.TouchInputSupport.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinGestureSupport.notifyNextTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/29531133.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.Scene.processTouchEvent(Unknown Source)
at javafx.scene.Scene.access$5600(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.touchEventEnd(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleEndTouchEvent$347(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$175/12964464.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleEndTouchEvent(Unknown Source)
at com.sun.glass.ui.View.handleEndTouchEvent(Unknown Source)
at com.sun.glass.ui.View.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.TouchInputSupport.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinGestureSupport.notifyEndTouchEvent(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/29531133.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I coded my application to work when exactly 2 touch points where applied, but it doesn't stop the exception above occurring.
Is there anything I can do, as its a shame to remove this touch ability from the app, thanks.
9 years ago
Hi,

I'm really struggling here...
I have 2 stages, stage-MAIN is behind stage-TRANSPARENT initially.
Upon pressing on stage-TRANSPARENT, I would like to do the following:

Steps
------
1. Take snapshot of stage-MAIN, and insert as ImageView into stage-TRANSPARENT
2. Move stage-TRANSPARENT to back of screen with .toBack();
3. Now move stage-MAIN to the back of screen with .toBack();
4. Since stage-TRANSPARENT is now in front again, remove the ImageView from it.

It seems like this should work fine without the desktop wallpaper flickering through, but it does flicker through.
Its like it renders it all in one go, even if I use Thread.sleep(1000) to pause each between the steps shown.
There seems to be 1 long pause, then it does everything, its not doing it sequentially as I need it to.

I'm even using Platform.runLater(), but it has little or no effect.

Can anyone help me figure out a way round this, I would pay a small amount by paypal to the first correct solution that I can get to work, if wanted.

Thanks very much.
9 years ago
Hi, I have a stage that I want to keep at the back of the desktop behind any other windows.

If I use stage.toBack(), then the stage flickers as it goes to the back of screen once pressed on.
So my partial solution was to use a transparent stage in front of this.
The transparent stage, I call it a "Visor", could accept mouse input and apply it to the main stage behind,
and it would prevent the main stage from being pressed on, so it will never be focused on and come to the front of screen.

This works, but there's an issue.
Suppose the main stage is at the back, and the visor is in front, and suppose firefox browser is partially covering the visor.
Then when the visor is pressed on, it will be focused and so come to the front of the screen, in front of firefox.
So after releasing mouse, and pressing on part of the firefox browser, it will not accept mouse input since its actually the visor that is being pressed on.
So basically I can't control the Z-order of this stage, except for toFront() or toBack(), but that doesn't stop the sandwhiching effect of a browser going inbetween the 2 stages.

I hope thats clear, please let me know if theres any suggestions to fix it, as its driving me up the wall.

Thanks very much.
10 years ago
hi there,

I've made a javafx application, when I close it by going to the taskbar, clicking on the java thing for it, and pressing close window....
The javaw.exe still remains in the TaskManager processes.

Is there a proper way to shutdown the program so the javaw.exe doesn't show in processes?

Thanks for any help
10 years ago
Okay, I tried closing the hibernate session object after making the query, it seems ok now.

But I don't know if its wise to do that or if it doesn't really matter.
Hi,

When I run my web-app(that uses hibernate) in firefox for example, the correct entries read from mysql table are shown.

If I then change records in the table, and open a new browser, say Chrome..
And load the same web-app, the updated value is not shown, I have to refresh the browser, even though its a freshly opened browser.

I don't really get it, when I call the servlet, it should read from the database and return the result, so why is it putting an old result on screen?

Thanks for any help.
Excellent, I was looking for something like that, but didn't think tomcat had one.
I know glassfish does in port 4848, but I took it off as it uses too much ram.

Anyway, it seems to work great so far, just browse to war, and deploy, great
10 years ago
Leaping Lizards!!

I figured it out, after scouring the internet, I read at the bottom of this page..http://pub.admc.com/howtos/tomcat/ch02.html#stagedir-section
that its best not to copy war files remotely into the webapps folder directly...
But to put them on the filesystem somewhere first, and then move them, (eg with mv command in linux for example)

So it wasn't about configuring settings thankfully, as there's enough of that already, hopefully this may help someone else.
Thanks for help given.

10 years ago
I just do this...

In netbeans, click on "Clean & Build"
Then I go into the "dist" folder of the project and the war file is in there (Same as I do for jar files of a normal java project)
I just copy it across with sftp, not sure if thats whats corrupting it or not.

Is there a better way?
10 years ago