All Questions
Tagged with background java
804
questions
1
vote
2
answers
53
views
Java Swing drawing gif as background to several JButtons and JLabels
I want to draw a gif as background to the starting window of my java project (small game in Java swing for school). Here's my code so far:
package graphic;
import javax.swing.*;
import java.awt.*;
...
1
vote
1
answer
31
views
Issue with simple java app that removes background from one image and overlays it onto another image and downloads the processed image
essentially what i'm trying to create is a simple Java app that when an image is uploaded it removes the black from the background and makes it transparent, then stores this image. Then, the image ...
0
votes
1
answer
59
views
Restart my app after an hour in the background
I want to restart my application when the user has the app in the background after one hour. I already did some research and I use a Service:
public class BackgroundService extends Service {
...
0
votes
1
answer
204
views
Service.startForeground() not allowed due to mAllowStartForeground false on Android 14
My app gets this error since Android 14. I succed to reproduce it by trying to start the app from android Studio when the device is power off (only the screen).
Here is a description of my code:
I ...
0
votes
1
answer
55
views
Java code with java.util.Scanner gets "[1]+ Stopped" when run with '&' (in background)
I wrote a program that supports interactive commands. I use java.util.Scanner for the input.
This program is also allowed to be run in background and in this case the Scanner is not necessary. So I ...
0
votes
1
answer
44
views
How can I set downloaded image as background in activity?
I get image from backend into variable ImageView and wish to set this image (which not in resourse files) as background in activity. I surf in internet, but found only variant with resource (drawable)....
0
votes
0
answers
83
views
Issue: Image hiding behind PDF element while embedding through Apache pdfbox library
I am using apache pdfbox jar to embed image to attached PDF with below JAVA code:
import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox....
0
votes
1
answer
61
views
Javafx scrollpane
I have made a button and I need to create a new scene and add a scrollpane to scroll some text when I type the button. But I want to set an image as a background, but for some reason the background is ...
-1
votes
1
answer
89
views
How can I make a background image in Java Swing responsive when resizing the frame?
I tried a simple program to add an image on the background of a frame using java swing. But whenever I resize the frame the background image size remains the same. That means If I shorten my frame, ...
0
votes
1
answer
107
views
How to replay a video after going back and how to loop the video in background
First Problem
I am making a guessing android game using java and I was wondering how can I use a video as the background of the home screen rather than having an image or simple colors? I got the ...
0
votes
1
answer
57
views
AutoCompleteText not update popup background
I am using AppCompatAutoCompleteTextView but I cannot change the background of the dropdown list or neither the color of the background of the selector. I tried color or drawable but nothing change.
...
0
votes
0
answers
135
views
How to create blur background when fab is clicked?
I'm new in developing android application.
I have troubles with creating blurred background when extended (floating) action button is pressed.
I've been looking for a solution for days, however ...
0
votes
1
answer
127
views
Android Studio Java: How do I set the background of a constraint layout to be an image from a URL?
I am developing an app that requires me to change the background image to those provided by URLs at different times. How do I do this however? Using the following method does not work because that ...
-1
votes
1
answer
35
views
JLabel.setBackground(Color.RED); Is Not Working
As you can see from the title, I can't set a background color of a JLabel.
Can someone please help?
package pl.maciekfruba;
import javax.swing.*;
import java.awt.*;
public class Main {
public ...
1
vote
1
answer
265
views
Dynamically background colour change in Android studio
My question is how an application like YouTube music and Spotify change the colour of the background with respect to the poster of any song.
I am giving an example how what it looks like and if anyone ...