ok so heres my question..
i need to create a software that fits for 1280x800 resoultion and our programming team has 1366x768 screens. So we decided it wud be cool to develop the UI like the Windows 8 start screen or the Nokia Lumia Home Screen. Thus we want to put a panel inside a scrollpane.
I found this piece of code from a site it completes our requirement. But problem is that we can not implement this in Netbeans. As the question says I need sum visual help on how to fix this in Netbeans. We are capable of hard coding it but I dont think it wud be preferred by the team.
package test;
import java.awt.*;
import javax.swing.*;
public class NewClass extends JFrame {
public NewClass() throws HeadlessException {
final JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createLineBorder(Color.red));
panel.setPreferredSize(new Dimension(800, 600));
panel.setBackground(Color.black);
final JScrollPane scroll = new JScrollPane(panel);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new BorderLayout());
add(scroll, BorderLayout.CENTER);
setSize(300, 300);
setVisible(true);
}
public static void main(final String[] args) throws Exception {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new NewClass().setVisible(true);
}
});
}
}
here's a screenshot of the image