Skip to main content

All Questions

Tagged with
0 votes
0 answers
60 views

Inverted colors of vector drawable

When I start the app some of my vector assets have the value of wrong color. If I start the app in light mode the vectors use the dark mode colors. If the dark mode is turned on and then off then ...
bacan's user avatar
  • 1
1 vote
0 answers
83 views

Understanding reSize() and add() for Vector class

Hi I am struggling with a java problem. I am trying to understand how to assign value x to new elements added to a vector where the existing elements would remain unchanged, e.g. if it was resized ...
Josh's user avatar
  • 11
-1 votes
1 answer
42 views

How should an ArrayList or similar structure be modified when elements regularly affect eachother every update of the container?

I am currently trying to create an entity based system for a game in Java with a handler class for updating and solving interaction between entities of different subclasses. They can damage each other ...
Calle Jonasson's user avatar
0 votes
1 answer
80 views

Question about vectors (player velocity) and Spigot API

I can’t understand how I can push the player back, left and right, I only understood how to push the player to the side where he is looking. I tried to use ChatGPT but it produced code that doesn't ...
Эмиль Крутиков's user avatar
1 vote
1 answer
217 views

Java Vector Api comparing two vectors

Why using Java Vector API from Java 21 (incubator), I compare two vectors and copy result into array. It fauls with exception: java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 2 ...
Hollow.Quincy's user avatar
0 votes
0 answers
17 views

Why wont my fireball go in the correct direction upon spawning?

I am making a Minecraft mod in Fabric, and one of the items I am adding is a simple fireball wand. Right click, and spawn a blaze fireball. Using raycast and vectors, I made what I thought would give ...
Jonah Alexander's user avatar
1 vote
1 answer
77 views

My quicksort method is not working as intended

I trying make a quicksort method whose only parameter is MyVector` (which is just a normal vector), but the method is not working as intended and I'm not sure why. The expected output is supposed to ...
edgeworth miles's user avatar
0 votes
2 answers
123 views

Conversion of Vector<Vector> to a String Array or a String[][]

I have a JTable containing only one columns of , called "Points" Points I have another JTable containing seven columns of , called "Lines" Lines I am writing a button handler that ...
Edelweiss Monville's user avatar
-2 votes
1 answer
66 views

Why is my vector not printing the String? [duplicate]

I'm studying vectors and while practicing with a few exercises i got stuck in this particular one, my code doesn't seem to print the name string, and I don't know why. In the final project I have to ...
Laura's user avatar
  • 1
3 votes
1 answer
112 views

How do I convert the numbers in my Vector<Object> into int?

How do I convert the numbers in my vector into int? I'm trying the numbers in my object array into int values for my if statenebt, but I can't find a way to do so. Can anyone help tell me what I would ...
edgeworth miles's user avatar
-4 votes
1 answer
62 views

Can I create a vector of threads and use to process data concurrently from database table in Java?

`Can I create a vector of threads in java Vector threads = new Vector<>(5); And assign them to process data from database concurrently I want to make a Java program where main method first check ...
Polash's user avatar
  • 1
1 vote
0 answers
73 views

OpenJDK Vector API type conversion issue (Double to Float)

I'm using JDK21 EA to test the Vector API performance. My original (non-vector) code looks like this: double[] src; double divisor; float[] dst; for (int i=0; i<src.length; ++i) { if (src[i]<=...
Jatinder Sangha's user avatar
0 votes
0 answers
35 views

Why Java Stack class (Vector) uses array instead of a reference to the last element?

If an advantage of a Stack is the fact that its can grow dynamically why java implementation is base on Vector which uses an array to hold the data of the "container" ? When the capacity of ...
Nozomi's user avatar
  • 56
-1 votes
1 answer
202 views

Error class Java.util.Vector casting method

I'm using import java.util.Vector, and when I get to the line in red where I use the Vector, the below error occurs: java.lang.ClassCastException: class javax.swing.JTable cannot be cast to class java....
Eduardo Agostinho's user avatar
-1 votes
1 answer
40 views

Rotation matrix not returning correct number on the Z Axis

I made a method in my Java code which translates a 3 coordinate vector into another 3 coordinate system basing my method on the rotation matrix which OpenGL used to have, here is the full method: ...
Mega2223's user avatar

15 30 50 per page
1
2 3 4 5
88