scroll.setColumnHeader(new JViewport() { @Override public Dimension getPreferredSize() { Dimension d = super.getPreferredSize();
tableScroller.setColumnHeader(null);
/** * The Implementation of this method should create the layout for the current class. */ private void createNormalLayout() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); createLabel("PacksPanel.info", "preferences", null, null); add(Box.createRigidArea(new Dimension(0, 3))); createLabel("PacksPanel.tip", "tip", null, null); add(Box.createRigidArea(new Dimension(0, 5))); tableScroller = new JScrollPane(); tableScroller.setColumnHeaderView(null); tableScroller.setColumnHeader(null); packsTree = createPacksTree(300, tableScroller, null, null); if (packsModel.dependenciesExist()) { dependencyArea = createTextArea("PacksPanel.dependencyList", null, null, null); } descriptionArea = createTextArea("PacksPanel.description", null, null, null); requiredSpaceLabel = createPanelWithLabel("PacksPanel.space", null, null); if (IoHelper.supported("getFreeSpace")) { add(Box.createRigidArea(new Dimension(0, 3))); freeSpaceLabel = createPanelWithLabel("PacksPanel.freespace", null, null); } }
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane scrollTable = new JScrollPane(table); scrollTable.setColumnHeader(null); scrollTable.setMinimumSize(new Dimension(100, 80)); Box tableBox = new Box(BoxLayout.Y_AXIS);
public static void createColumnHeader(ActionContext actionContext){ JScrollPane parent = (JScrollPane) actionContext.get("parent"); Thing thing = World.getInstance().getThing("xworker.javax.swing.JViewport"); JViewport obj = (JViewport) thing.run("create", actionContext); if(obj != null){ parent.setColumnHeader(obj); } }
providersTableScrollPane.setColumnHeader(null); providersTableScrollPane.setVerticalScrollBarPolicy(20); providersTableScrollPane.setHorizontalScrollBarPolicy(30);
jv1.setView(new JLabel("COL LABEL")); scrollPane.setColumnHeader(jv1);
/** * Overrides to make column header viewport synchronizing with the main viewport. * * @param columnHeader the column header */ @Override public void setColumnHeader(JViewport columnHeader) { JViewport old = getColumnHeader(); super.setColumnHeader(columnHeader); if (old != null) { JideSwingUtilities.unsynchronizeView(old, getViewport()); } if (getColumnHeader() != null) { JideSwingUtilities.synchronizeView(getColumnHeader(), getViewport(), SwingConstants.HORIZONTAL); } }