Java JTable Style

How To Style A JTable Using Java NetBeans

JTable Style In Java



In this Java Tutorial we will see How To Style The Jtable By Changeing Row Height, Show Grid, Set Grid Color, Set Background, Set Foreground, Set Selection Background,  Set Selection Foreground, Set Font In Java NetBeans .




Project Source Code:


        jTable1.setRowHeight(40);
        //jTable1.setRowHeight(1, 100);

        jTable1.setShowGrid(true);
        jTable1.setGridColor(Color.red);

        jTable1.setBackground(Color.BLACK);
        jTable1.setForeground(Color.WHITE);
        
        jTable1.setSelectionBackground(Color.WHITE);
        jTable1.setSelectionForeground(Color.BLACK);
        
        jTable1.setFont(new Font("Comic Sans MS", Font.ITALIC, 20)); 


OutPut:

Style JTable Using Java




Share this

Related Posts

Previous
Next Post »