Skip to content

Tag: java

Rest Assured – can’t POST with Parameters and Body

I’m testing a REST api using Rest Assured. I’m running into an error when trying to POST with both a parameter in the url and body content. This works correctly when testing manually. Removing the parameter form the url is not an option Test Code: Which throws the following error when run Why does…

Getting location of cell in JXTreeTable

How to determine the location of a particular cell in JXTreeTable on screen? Answer not sure, but merging some information gathered on topic. this link shows the way to compute swing component coordinates: Getting coordinates of a component in java this link shows, that JXTreeTable extends JTable:- this link …

Duplicating objects in Java

I learned that when you modify a variable in Java it doesn’t change the variable it was based on I assumed a similar thing for objects. Consider this class. After I tried this code I got confused. Please explain to me why changing any of the objects affects the other one. I understand that the value of …

ArrayList input java

Im looking at the problem: Write a program which reads a sequence of integers and displays them in ascending order. Im creating an ArrayList (which I am new to) and I want to populate with integers input from the command line. With an array I could use a for loop with but with an ArrayList of unbounded size I…

Very slow debugging in Eclipse

I try to debug Jonas webapp under Eclipse. Unfortunately when I connect to the remote application everything works terriblly slow (also after killing all java applications and restarting the PC). I use also JRebel. What might be the cause of such behaviour? Answer You could also try using the Java Monitoring …

Refresh elements of GUI in java

I’m new to GUIs in java. For example, I need to update just 1 element (e.g., JLabel). In Tkinter I would use something like root.update() or root.update_idletasks(). I wonder if a similar simple function exists in for applications made with swing. I’ve tried gui_element.SetVisible(false) and gui_e…