Hi
I am designing a form using swing components in my applet. I want to have a strip on top of my form with a title in it. I am using jpanel and color bachground for it. My problem is that I cannot decrease height of the jpanel more than a minimum size. It covers one fourth part of my form. below code:
JPanel jpRow0 = new JPanel(new FlowLayout(FlowLayout.RIGHT, hgap, vgap));
jpRow0.computeVisibleRect();
jpRow0.setPreferredSize(new Dimension(695, 1)); // does not work !!!
jpRow0.setBackground(new Color(0,0,128));
JLabel lblFormTitle = new JLabel(TitlePersian.REPORT + " " + TitlePersian.INVOICES_ + " " + TitlePersian.CONTRACT);
lblFormTitle.setFont(Global.font);
lblFormTitle.setForeground(new Color(255,255,255));
jpRow0.add(lblFormTitle);
getContentPane().add(jpRow0);
does anyone has experienced my problem and has a solution? I would be thankfull if share your knowledge .
Thanks in advance
Habib