JLayer is a decorator for Java Swing components, often used for for painting over and catching events from subcomponents in the Swing framework.
Questions tagged [jlayer]
136 questions
2
votes
1 answer
Placing Grid over Image using JLayer
I want to place a Grid over a Image. I used a JLabel that holds the Image using paintComponent method,I used this method because the image will be changing during different phases in my project and for the JLayer the class GridDrawer extends…

Jaymit Desai
- 153
- 1
- 2
- 11
2
votes
0 answers
converting mp3 to byte in java
I found this code for playing mp3 in java and I want to stream this in a network using UDP so I want to convert the mp3 file to byte so I can send it using DatagramPacket. What should I convert to do this?
I will be needing to send 60Kbyte of buffer…

LorenzKyle
- 69
- 10
2
votes
1 answer
Use AudioTrack with JLayer decoder
I'm working on the Android application which is using JLayer library to decode MP3 file (I need access to audio samples) and AudioTrack object to play it. I have something like this:
int timeMarker = 0;
int timeStep = 5000;
while (!isCancelled())…

Gie
- 1,907
- 2
- 24
- 49
2
votes
2 answers
Playing mp3 data compressed by lame mp3 with JLayer and Audiotrack in android
I have followed this example to convert raw audio data coming from AudioRecord to mp3, and it happened successfully, if I store this data in a file the mp3 file and play with music player then it is audible.
Now my question is instead of storing mp3…

Ichigo Kurosaki
- 3,765
- 8
- 41
- 56
2
votes
1 answer
Problems using javazoom's Player
I'm trying to play mp3-files using the JLayer Class Player. After starting the Thread containing
myPlayer.play()
you can hear some hundred milliseconds of the beginning of the song and then the player interrupts and I get the following error…

user3021755
- 23
- 5
2
votes
2 answers
JLayer always throws ArrayIndexOutOfBounds Exception
I'm using JLayer to decode an MP3, and store it as PCM Data. However, no matter what MP3 file I use, I always get an ArrayIndexOutOfBoudnsException with the index 443. I have heard that this only happens with certain MP3s, but it is happening on…

gameboyprinter
- 55
- 1
- 7
2
votes
1 answer
Stacking JLayer classes (to a JPanel)
I was hoping to stack instances of JLayers ontop of each other to get a layered effect but they don't seem to want to work that way. I'd like to decorate a single JPanel with multiple effects implemented by multiple LayerUI classes.
For…

Toby
- 9,523
- 8
- 36
- 59
2
votes
2 answers
Problems decoding streamed mp3 data using JLayer
Im trying to use the JLayer java lib to decode an mp3 data stream. I have a callback which is called asynchronously when the next chunk of mp3 data has arrived from the network. Each chunk that arrives contains 4 mp3 frames in byte[] format. This…

Sabobin
- 4,256
- 4
- 27
- 33
2
votes
2 answers
FileNotFoundException, the file exists Java
I have a very strange issue, I'm trying to play some MP3s with some Java code and JLayer. I have a method setup to generate the file path, but it's giving me a ton of grief. Here is the return statement (and all the code involved in the…

skylerl
- 4,030
- 12
- 41
- 60
2
votes
1 answer
Adding a JPanel with fixed size above a JLayer
Following Oracle's Myopia guide, I have a simple JPanel which is added to a JFrame as a JLayer. Simple enough, this blurs the JPanel's components. However, I'm trying to add a second JPanel above this JPanel (meaning that it won't get…

Zar
- 6,786
- 8
- 54
- 76
2
votes
2 answers
Secure Desktop Mode effect for java application
Does anyone now how to achieve a "Secure-Desktop Mode" (effect) such as one gets from the Windows Vista/7 UAC consent-blocks?
I assume it is some function which will remove pixels here-and-there (and possibly graying them) and then finally drawing…

Aiden Strydom
- 1,198
- 2
- 14
- 43
2
votes
1 answer
jLayer -- Playing mp3 causes distortion at start of file
I'm using jLayer 1.0 to play a simple mp3 file. It works fine apart from the first 3 seconds or so (adding 5 seconds of silence to the start of the track fixes the issue). This is the code I'm using:
try
{
final Player player = new…

user1735972
- 103
- 1
- 7
2
votes
0 answers
Java 7 - JLayer, no LockableUI
Having never before used J(X)Layer, I can see references to LockableUI over the internet. But it looks , in Java 7, like all we have of seemingly big 'parent' API (JX...) is two classes JLayer and LayerUI.
Is there some 'hidden' way of blocking…

pafau k.
- 1,667
- 12
- 20
1
vote
4 answers
Write mp3 file to disk while playing in Java
I have an application playing remote MP3 files over HTTP using the JLayer/BasicPlayer libraries. I want to save the played mp3 files to disk without re-downloading them.
This is the code using the JLayer based BasicPlayer for Playing the MP3…

nanoman
- 1,069
- 12
- 27
1
vote
1 answer
How do I get tooltips to activate on a JLayer-covered JComponent?
I have a Java class that extends JTextField and covers it with a JLayer (new Java 1.7 feature) in order to display custom graphical effects in certain conditions. Without the JLayer it is easy enough to add a tooltip using setToolTipText(String).…

Mike O
- 291
- 1
- 4
- 17