David Garratt

Ranch Hand
+ Follow
since Aug 08, 2003
David likes ...
Mac Eclipse IDE Safari
Peterborough, UK
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
4
Given in last 30 days
1
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Garratt

Many thanks both of you - I will do what you suggest.
2 weeks ago
I develop on MacOS with Eclipse IDE. I would like to add Java 11 to the runtimes available for Eclipse Projects without making it the system default. I use Adopt OpenJDK Java 8 as my system default JDK/Runtime.

Whats the best way to accomplish this to I run the .pkg installer for Java 11 and then re-install Java 8 or should I try and find a zip of the JDK contents which I can extract somewhere ?

Dave
2 weeks ago
Sorry - the client side. To replicate the functionality of the example code (Java 11) but I need to perform the same using Java 8

Thanks
1 month ago
I am using Java 8 and I would like some advice on how to accomplish the same result as this sample code Labelary ZPL Web Service which is unfortunately written for Java 11.



I am vaguely aware that some API's were moved out of Java 11 and if at all possible I would like a solution which is both compliant with Java 8 and Java 11.

Web services are something to which I have no experience of and a pointer at a suitable 3rd party library would save me a lot of hunting around.

My first attempt has come across Apache CXF and I downloaded it, but the associated lib folder contains an overwhelming number of jar files to choose from. I'm not using Maven in my project.

Dave
1 month ago
I did notice my images did not make it so I have provided some links instead. Might help.

Dave
1 month ago
I have an application which I launch from the command line (MacOS). I have added a shutdown hook to my initial code so that it closes down gracefully.

The entry point for the application is non visual and runs in a terminal window. If I close terminal by either using the (red) button on the terminal window - or use the pull down menu for the active application title bar then my shutdown hook code is triggered and the application shuts down cleanly.

So - now for the tricky bit to explain. My terminal window which is running creates a number of JFrames which I display real time information in. If one of these windows has focus then the Mac title bar changes from showing Terminal to the name of the initial Class name of my GUI. I suppose that's reasonable.

However if I now use that new title bar at the top of MacOS and select Quit for the GUI component then my shutdown hook does not get called and in fact I have to forcibly terminate the application.

I doubt it's the case but it almost appears that the startup code running in the terminal window is using one JVM and the GUI code is running another JVM - the later not having a shutdown hook.

I appreciate this probably not a good explanation and might be mac specific.

I have added 2 screen dumps.

Image 1

Image 2

1 month ago
Just got round to adding this to my application and it works exactly as I needed it to.

Many thanks.

Dave

2 months ago
The use of the var type
2 months ago
I tried your code but I got stuck as I think your example is for Java 10 and I'm still using 8
2 months ago
Thanks for your quick reply - I'll certainly give this a try.

Dave
2 months ago
My Java 8 Swing based app starts up and only has a System Tray Icon as the user interface. I have added a menu to it and one of the options is "Quit"

I've put a confirmation question against the Quit option in the form of a JOptionPane.

Sometimes this appears on top of any other application window which might be on my desktop, sometimes it does not.

When I say "other application window" I mean something else that the OS is running - not part of my Java app.

So I was wondering is there a way to force this dialog to appear in front of any other window or will I need to write my own JDialog instead of using JOptionPane ?

Many thanks

Dave
2 months ago
I’ve been searching without success. Lots of references to tool chains which are not relevant as I’m not compiling native arm code - just java bytecode.
7 months ago
Is the current version of Eclipse available on the Raspberry Pi arm CPU ?
7 months ago

Stephan van Hulst wrote:It really depends on what kind of application you want to make. Do you want it to be a webapp? Is it a desktop app? On what device do you want to run the app?




The application is a desktop Swing application and you can see the look of it from this page. Website

Ideally it would be nice to keep it consistent but if it's not possible then I will work with what can be done.

Thanks

Dave
7 months ago
Ok - so I'm not talking about Collections or anything like that. I'm talking about a Map in the same manner as Google Maps (Plans) etc- which can be quite problematic when searching on the internet for help.

I have a Java Swing application which I want to record the physical location of an object on a map (diagram). I am wondering if I might do this with Java Swing using an Frame, Scroll Panel and Image - or use the approach of opening up a web browser with url parameters which indicate the name of the map and some co-ordinates which would be retrieved from my database.

I appreciate it's a blank canvass at the moment (no phun intended) but would welcome any ideas from anyone who might have done something similar.

Many thanks

Dave
7 months ago