S Connor

Ranch Hand
+ Follow
since Aug 15, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by S Connor

Hi,
I've made a program to write to a .txt file.  Unfortunately the program is adding some strange symbols.  Can you please explain how to solve this problem?  I have included the program and the output below.



The output looks like this:
’ t testing update.
2 weeks ago
Hi,
I'm working through a java textbook and I came across this exercise which has an infinity sign.  I have attached a picture.  Could you tell me what it means please?
1 year ago
Thanks.  Do you know how I could rotate or reflect the image somehow?
Hi,

I want to make a project that will draw a kaleidoscope. I would need to draw some shapes inside a triangle and then reflect that triangle in six directions to make a hexagonal display.

I don't know how to draw shapes within a triangle so that any part of the shape that extends beyond the boundary is not drawn and I don't know how to reflect the shapes to make a hexagon.

Can you give me any tips please?
This worked for me, just had to increase the thread sleep time. Thanks very much
2 years ago

Lou Hamers wrote:

(You can just throw the InterruptedException from main() for the test.)



Can you explain how I would do that please?
2 years ago
I tried removing the / character as you suggested. Unfortunately, the sound file still does not play.
2 years ago
I've tried changing the file name to



still no luck.
2 years ago
Hi,
I'm trying to play an audio file using AudioClip.  The project compiles but no sound will play.  Can you advise me what the problem could be?

2 years ago
I think that the issue has been resolved.

Can you tell me whether the method Audioclip I was trying to use is a method from java applets which are no longer being used? (I apologise if I am using the wrong terminology).
2 years ago
I added the dependency after you told me to.

When I select clean and build I get the following:

cd C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest; "JAVA_HOME=C:\\Program Files\\Java\\jdk-18.0.2.1" cmd /c "\"C:\\Program Files\\NetBeans-14\\netbeans\\java\\maven\\bin\\mvn.cmd\" \"-Dmaven.ext.class.path=C:\\Program Files\\NetBeans-14\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" clean install"
Scanning for projects...

-----------------< com.mycompany.soundtest:SoundTest >------------------
Building SoundTest 1.0-SNAPSHOT
--------------------------------[ jar ]---------------------------------

--- maven-clean-plugin:2.5:clean (default-clean) @ SoundTest ---
Deleting C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\target

--- maven-resources-plugin:2.6:resources (default-resources) @ SoundTest ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\src\main\resources

--- maven-compiler-plugin:3.1:compile (default-compile) @ SoundTest ---
Changes detected - recompiling the module!
Compiling 1 source file to C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\target\classes

--- maven-resources-plugin:2.6:testResources (default-testResources) @ SoundTest ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\src\test\resources

--- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SoundTest ---
No sources to compile

--- maven-surefire-plugin:2.12.4:test (default-test) @ SoundTest ---
No tests to run.

--- maven-jar-plugin:2.4:jar (default-jar) @ SoundTest ---
Building jar: C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\target\SoundTest-1.0-SNAPSHOT.jar

--- maven-install-plugin:2.4:install (default-install) @ SoundTest ---
Installing C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\target\SoundTest-1.0-SNAPSHOT.jar to C:\Users\montk\.m2\repository\com\mycompany\soundtest\SoundTest\1.0-SNAPSHOT\SoundTest-1.0-SNAPSHOT.jar
Installing C:\Users\montk\OneDrive\Documents\NetBeansProjects\SoundTest\pom.xml to C:\Users\montk\.m2\repository\com\mycompany\soundtest\SoundTest\1.0-SNAPSHOT\SoundTest-1.0-SNAPSHOT.pom
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time:  0.864 s
Finished at: 2022-12-14T20:52:55Z
------------------------------------------------------------------------
2 years ago
2 years ago
Yes I tried to add to add it to the source file.  I am using an IDE called Apache Netbeans. When I started the project I selected an option called Java with Maven.

To add the other JavaFX libraries I simply wrote 'import javafx.scene.media.Media;'
2 years ago
I tried to add the code,  I got an error message:

class, interface, enum  or record expected
2 years ago