[Solved] How do I fix NullPointerException and putting data into NatTable

[ad_1] Your problem is that you have nested objects and you want to access them via reflection. That is not working! If your Student would only have one exam, you would need to change the propertyNames to this: String[] propertyNames = { “name”, “groupNumber”, “exam.name”, “exam.mark” }; and the definition of the data provider to … Read more

[Solved] SWT – Snap display to right hand side of the screen

[ad_1] Here is some code that utilizes the functions found by sambi: public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout(SWT.VERTICAL)); shell.setText(“StackOverflow”); Monitor primary = display.getPrimaryMonitor(); /* Get the available screen size (without start menu) */ Rectangle area = primary.getClientArea(); shell.pack(); /* Set the shell … Read more