Skip to content
Advertisement

Disable Column Header sorting on a JTable

Is it possible to disable manual sorting on a JTable after adding a sorter? So I have a JTable that has the following sorter attached to it (basically sorts by column 3 when the table is initialised): This works fine, however the user is still able to click on the column headers in the table and sort by any of

Setting all values in a boolean array to true

Is there a method in Java for setting all values in a boolean array to true? Obviously I could do this with a for loop, but if I have (for example) a large 3D array, I imagine using a loop would be quite inefficient. Is there any method in Java to set all values in a certain array to true,

android on Text Change Listener

I have a situation, where there are two fields. field1 and field2. All I want to do is empty field2 when field1 is changed and vice versa. So at the end only one field has content on it. It works fine if I attach addTextChangedListener to field1 only, but when I do it for both fields the app crashes. Obviously

Chaining static methods

This might not have a solution, or I might have not been able to find one, but here it is: !! Note: the code below is incorrect, I know. I just want to show what exactly I would like to accomplish. I would like to do something on the lines: … in order to do the below somewhere in another

Draw a line with curved edges in Android

I am using canvas.drawLine to draw some line in android but the lines are too sharp but i need a curved edges Here the 1 is what i have and 2 is what i want to achieve, means a line with curved edges rather than straight edges How can I achieve that ?? EDIT 2: I am trying to use

How to configure UCanAccess JDBC driver with Spring?

Whenever I tried to use an ODBC driver to access MDB files, it gave me an error: So I decided to use the UCanAccess JDBC driver instead. Does anyone have experience configuring UCanAccess JDBC driver with Spring? I’ve put the UCanAccess.jar into my lib folder and configured it like below, but that doesn’t work: My development environment: Spring Framework 3.x

Advertisement