Now, you have to read everything I write. You must not ignore parts.
This is what I wrote in post #1
In post #7 I show what the selection behaviour I want looks like. But that code...
Type: Posts; User: LeslieS
Now, you have to read everything I write. You must not ignore parts.
This is what I wrote in post #1
In post #7 I show what the selection behaviour I want looks like. But that code...
When you click on a cell the entire row is highlighted.
That is the behaviour I want.
Its even easier to show you. Just don't use the cell renderer and run the code.
When you click on...
I want to set the background colour of the row where a start of a record is. This is a row where column 0 has a value.
That you can see in the demo code as cyan.
Unfortunately the only way to do...
Here is a main file to use to test with.
import java.util.HashSet;
import java.util.Set;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import...
I am using the following code to change the background colour of row where the first cell is not blank.
It works but it also changes the colour of highlighting of selected rows.
I want the...
This is a case of the code not being formatted very well. The last line 'return 0;' is not inside the if/else blocks.
Because the if and the else are not using {}, they are single line...
Looks like it. Its a shame he might miss the answer here, but over there they seem to know a lot more than I do about the various date types in java.
I couldn't get it to recognize ZoneId without the specific import:
import java.time.ZoneId;
Next in the try block you are using systemDefault but that is a method and needs the ()
...
Your addStudent method should look something like this:
public void addStudent(Student student){
switch(student.getRole()){
case "Writer":
// do writer stuff
...
When I visit a forum thread the last posted message comes up blank. I have to log-in and start a reply to see the post text.
This picture shows what I am talking about. There is text in my reply...
I use the GUI builder of NetBeans and put a panel on a frame and controls on the panel.
How do I then apply GridBagLayout to these controls?
I have tried re-adding the control to the panel in...
Problem #1 is you have not defined a 5x8 array.
You have defined a 2x9 array [0 to 1][0 to 8].
Each bracketed set of numbers is one 'row' of the matrix.
int[][] array = {
...
Yes, that is the default class name from the online compiler.
The example you have shown is a class instance being declared and an instance of another class as an argument to the constructor.
Every class has a constructor. If the coder doesn't provide one...
Although Java parameters are defined as "passed by value" it doesn't hold quite so fast with objects as it does with simple types.
If an object is passed as a parameter, that parameter is copied...
I am loading an Image resource then converting it to BufferedImage but the conversion routine uses the images width and height and until the image is fully loaded these return -1.
I use a while...
In my case:
cp=home/noone/NetBeansProjects/OddCouplePoker/resources
resPath=
images/pokertable.png - error
/images/pokertable.png - no error
pokertable.png - error...
Thank you Norm, however, sadly the resource is still not being loaded.
The folder was not in my class path.
I added it in and now the output from
...
The folder resources/images is on the class path I think. I added the folder to Project properties - source package folders.
If you look at the image I linked you can see the image is in the...
For anyone that is having this issue the resolution was to (actually) add the folder to the class path.
Contrary to what you will find via google, the path cannot be added via project properties...