• Post Reply Bookmark Topic Watch Topic
  • New Topic

Importing.  RSS feed

 
Bod McLeon
Ranch Hand
Posts: 78
IntelliJ IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just need to ask a couple questions:
Is there a way to import sound into something (Like a sound engine) or is that just two complicated.
And is there/or what is the way to import a .png file.

If there is a way can you please post the code below VVVV
 
Tim Moores
Saloon Keeper
Posts: 4035
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "import"? Java has APIs for playing sound (in the javax.sound package) and reading images (in the javax.imageio package).
 
Bod McLeon
Ranch Hand
Posts: 78
IntelliJ IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:What do you mean by "import"? Java has APIs for playing sound (in the javax.sound package) and reading images (in the javax.imageio package).


I just mean how to (Its hard to explain) get the image to appear on you screen.
By 'Importing' I Mean like: Scanner 'x' = new scanner(xxxxxx)
But for a .png file
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use the word "importing", but this is confusing since it makes people think of the import statement, which has nothing to do with what you're asking.

As Tim already mentioned, Java has support for playing sound and reading image files and displaying images, so yes, that's possible in Java.

Oracle has a nice set of Java tutorials, and there are also tutorials on working with sound and graphics:

Trail: Sound
Trail: 2D Graphics
 
Bod McLeon
Ranch Hand
Posts: 78
IntelliJ IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys! I did not really know how to word it. Im pretty knew to this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!