All Questions
2,320
questions
0
votes
0
answers
38
views
Error deleting data from txt Android Studio/java
I I have an application that saves some data in a txt to be able to manage subscriptions to Firebase notifications.
Simply when you subscribe to a topic, that topic is saved in a txt so you can later ...
0
votes
1
answer
106
views
Automatic and manual text wrapping in Java
I need as the title says to wrap a text (a String) in Java in both, automatic and manual mode. For automatic mode I use the "word-wrap" library that wrap the text with a max-length ...
0
votes
1
answer
67
views
prevent node blur in javafx
this is a rather simple question but ive found no answer to it so far . Inside my code i need a text node to be extremly close to the camera(its a 3d engine), needing to be very small so it fits in ...
0
votes
0
answers
56
views
React native selectable text doesnt work on some xiaomi devices
I'm using react-native-selectable-text currently on my app and it's working with no issues on android devices except some xiaomi devices.İ tried to customize selection (e.g: Choose,add to favorite) ...
0
votes
2
answers
83
views
Java - String that starts with '#'
Can someone explain to me, why we need to write 'line.indexOf('#') == 0' in this code? I'm trying to load data from a text file and create objects.
Path path = Paths.get(getClass()....
-1
votes
2
answers
55
views
Is there such a thing as "scanner.newLine();" that could read a console input multi-line paragraph?
TLDR: I want to paste a multi-line paragraph into the console (to be used in a method) but due to .nextLine() it only puts the first line into a String variable and ignores the rest.
Hello everyone,
...
0
votes
2
answers
40
views
Align text in toString
I want to keep the order as it is in this code, but I don't know how to make the value of degree under the value of university
@Override
public String toString() {
return "Education&...
0
votes
0
answers
61
views
How would I be able to read and render fonts in Java with a pixel array?
For fun and to lean about Java I've tasked myself with creating an application that can render images and lines with a pixel array.
I have a function that sets a pixel's colour in that array:
pixel(...
0
votes
0
answers
48
views
PDFBox not writing lines correctly in new PDDocument
I have a long text (which I got by using PDFTextStripper) I splitted in lines by doing text.split("\\r\\n");,
Then I remove control characters:
line = line.replaceAll("\\r\\n", &...
0
votes
0
answers
34
views
Issues trying to move JLabel inside JPanel to bottom right hand side JAVA
JLabel answer = new JLabel(); //create new text for the answer
answer.setText("50235.226");
answer.setForeground(new Color(0x00FF00)); //set font color
answer.setFont(...
-2
votes
1
answer
202
views
Text adventure game. One method thinking that I am not in any room when I am, in Java
Hi so like I said I am making a text adventure game in Java and for some reason, everything else works except the method that makes it so when I am in a room I can pick up any items there. It thinks I ...
1
vote
1
answer
79
views
how to extract variables based on a pattern braces using regex in Java?
Have this data input:
pattern: anyValue{variable1}otherValue{variable2}lastValue
value: anyValuehellootherValueworldlastValue
Expect this output
variable1: hello
variable2: world
can i have any ...
1
vote
1
answer
1k
views
Android java Share Intent image plus text and link how to
I've been trying for days to get Shared Intent working on Android with an image, text and a link at the bottom. In the image is what I want to achieve. You can see what I get at the bottom.
What I ...
0
votes
0
answers
61
views
How to get certain files in Intellij IDEA just by name and not direct path
So let say I have a package called food in src folder inside my restaurant project. Then I created a file call recipe which contains some food names that is also inside the same food package. Then ...