JScrollPane透明效果设置 要设置JScrollPane透明,同时要设 scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false);