Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
UK / DE
Cows and Likes
Cows
Total received
164
In last 30 days
1
Total given
22
Likes
Total received
1324
Received in last 30 days
12
Total given
625
Given in last 30 days
7
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

There are many imaging libraries available for Android, but they make use of the Android imaging API rather than Java's AWT classes. So I'm afraid the idea of a cross-platform imaging library is pretty much a non-starter. You should be able to use a C/C++ imaging library like Skia via JNI on the desktop and via the NDK on Android, if native code is acceptable.

What imaging operations do you need on Android that are not available via Android's built-in classes?
1 day ago

Mdri Na wrote:What are the file extensions allowed for upload?


I think it's limited to image files.

As others have said, paste a small, relevant excerpt from the file into a reply. And yes, if the point is to demonstrate the file's size, that's not necessary.
1 day ago
You should not design you own connection pool, but use the one built into the servlet container. See https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html for how to use Tomcat's.
Is there exception handling in the code part that you left out?

Is interrupt() being called on the thread at an appropriate time, like when the back button is pressed?
4 days ago
Welcome to the Ranch.

Java is perfectly able to handle large XML files - IF you use the right API. A DOM-type approach that builds an in-memory representation of the entire document is likely to fail, but there are other APIs specifically designed to be more memory-conscious. StAX is one of them, and it's part of the Java API.
4 days ago
If the code performs a network operation in its own thread, it may not be possible to stop it right away. You need to ensure that -whatever it is doing- has no effect on the app, and that any exception that may occur within is properly caught - which in this case apparently does not happen.
5 days ago
So it seems that pressing the back button somehow interferes with the background network activity. Given that the network activity is on its own thread, that shouldn't happen, as whatever the network access does, has nothing to do (or at least should have nothing to do) with any GUI. So: what does pressing the back button do? Do you have code that runs in that case?
5 days ago
The ButtonPlayer class is never instantiated, so the fact that it implements ActionListener is irrelevant.

There are also two MyButton objects (in lines 12 and 21), and the one that is used by the code never has an ActionListener added to it.
1 week ago
Group ID, artifact ID and version are given in the article. If you fill in just those values, does it work? (The versions are outdated, but you can update them to the current later once everything works.)
1 week ago
Course "Generate Dynamically PDF files using Python and ReportLab" for EUR 10.
1 week ago

Pat Watson wrote:To answer your question, they will be login into the application. So, the first thing they will encounter is a GUI where they will have to enter their userID and password, which will indeed be saved into the SQL Server. This needs to be done to keep track of changes made within the DB. Once they enter the correct userID and password, they get access to the next GUI to interact with the DB. I hope it makes sense?


Yes. I'm just trying to understand how the security works. So they can register right from within the app if they don't have an account yet. Instead of a userID or username, it's customary to use an email address these days, so you have way to contact users if need be. Not sure if that would be relevant to your app.
1 week ago
This sounds more like mail server functionality than mail client functionality. Assuming that Outlook is used on conjunction with Exchange, I'm sure that Exchange can be configured to auto-forward mails from one account to some other address.

What's more, web hooks (even if Outlook or Exchange supported any) sounds like the wrong approach if the goal is to send emails. You could check if there are plugins that support this: https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/
1 week ago
The GUI part could use JavaFX, for which introductory material can be found at https://docs.oracle.com/javase/8/javase-clienttechnologies.htm

The corresponding tutorial for JDBC is at https://docs.oracle.com/javase/tutorial/jdbc/basics/index.html

The JDBC driver for SQLServer is available from Microsoft.

The desktop application should have a login page


What would the user be logging into? Some hard-coded credentials in the app? Or would credentials be kept in the SQL DB? In either case, the DB credentials would need to be hard-coded in the desktop app. Unless the login credentials would actually be the DB credentials.

and then how to package it.


The usual packaging for Java desktop apps is a jar file, which can generally be double-clicked to start the app. See "JAR Files as Applications" in https://docs.oracle.com/javase/tutorial/deployment/jar/run.html
1 week ago

Tim Holloway wrote:That's an incorrect specification.


The JSP part looks correct. I can't be bothered to find it in the servlet spec right now, but https://docs.oracle.com/cd/E11035_01/wls100/webapp/configurejsp.html#wp162442 (about WebSphere, not JSP in general, but at least coming from Oracle) indicates that this is exactly how one should map a JSP file. I'll grant you that it is an odd (and undesirable) thing to want to do, but perfectly legal nonetheless.
1 week ago