Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Cyanite84918y@shozukan
If devRant adds a gentle community where anyone can ask dev questions without the strictness of SO, devRant will own the game. -
Set small invisible buttons in the corners, save the xy position on click, save xy on release and resize the panel based on the distance between the two points.
-
@Cyanite "quetions" tab might be appropriate ;)
But it would be a good idea, this is the most friendly community I've seen
I can't help you with your problem unfortunately, not enough knowledge to say anything, not enough time to search for a solution, sorry -
Cyanite84918y@RazorSh4rk
I dont need an invisable dutton. I can add an event trigger onto a label. And that wouldn't work because the dragging effect wouldn't hold. It would only resize the window after you released the mouse. -
@Cyanite maybe after starting to drag, update the size of the window every few ticks
If that makes sense -
@Cyanite idk if i get your question but i would recommend that
Use a Dimension variable that stores your default sizes.
use: addActionListener on the object that will change its size and increment the dimension variable, then setSize(dimension) on that object.
btn.AddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//here u can check event type e
//ex check if its a click, hover..
//modify dimension values
node.setSize(dimension)
//use setSize
}
}); -
Cyanite84918y@0x41414141
Think you could walk me through this on Telegram @TheCyaniteProject? I'm pretty new to Java. -
@Cyanite
I can give you the project I made in university that i looked over before answering to your question.
It doesn't have the code to your needs but has some windows and actionlisteners and set of sizes.
I used my last brain connections to write that answer.
It's 9 PM here in Romania and i am exhausted after work and master courses, just want to chill with a beer and watch some dota. -
Cyanite84918y@0x41414141
I don't believe your answer is for javafx. I can't find the event listener imports -
trogus131648yWe'll probably add a Q&A section soon, though it'll be more opinion based questions like Quora than SO as the super technical nature of SO lends itself to people being sticklers for the details and newer devs asking basic questions because they are too lazy/entitled to do a search first, all that can bring out the worse in people fighting to be "right"
Related Rants
I know this really isn't the place for this, but I REALLY need help..
I need to add app scaling inside my game.
To do this, I need to listen for a MouseDragEvent (or similar) on a JavaFX object like a Label or Image.
Here is my SO post:
http://stackoverflow.com/questions/...
Thanks in advance!
undefined
javafx
events
java