Tag Archives: panel

Swing JPanel with background image

By | March 7, 2011

This code add an image to Jpanel. JPanel panel1 = new JPanel(); JFrame recursion_frame = new JFrame(); BackgroundPanel stack_image1 = new BackgroundPanel(“Recursion.jpg”); panel1.setLayout(null); panel1.setLayout(new BorderLayout()); panel1.setBackground(Color.lightGray); panel1.setVisible(true); recursion_frame.setContentPane(panel1); ///adding to panel… recursion_frame.getContentPane().add(stack_image1); //adding image to panel…

Dynamically Load CSS in Adobe AIR/FLEX / Load css in Adobe AIR/FLEX using Class.

By | March 2, 2011

This example shows how to dynamically load css in Adobe AIR / FLEX. Here in this example Panel id the tag name for the panel control. Drag a panel control to your design then copy the code to your source file. “myTabs” is the class for the CSS. Panel { borderColor: #CBE0FF; border-style:solid; borderThickness: 1;… Read More »