LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-31-2007, 03:00 PM   #1
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Rep: Reputation: 30
Image won't show - JAVA, complete code


Doing a project and just can't get the image I am trying to display on the button "logoButton" to show.

Using Eclipse Platform, Version: 3.3.0, Build id: M20070921-1145nEvent;

Jigloo 4.0.2

Ubuntu 7.04 - Java 6

Prolly something mighty trivial but just can't seem to find out why I cannot stick the image onto the button. Have done it before, but the old code doesn't work any more.

import java.awt.event.ActionListener;
import javax.swing.ButtonGroup;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.SpinnerListModel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

public class PatientDataGui extends javax.swing.JFrame {

private JLabel patientIDLabel;
private JLabel firstNameLabel;
private JLabel lastName;
private JLabel centimeterLabel;
private JLabel meterLabel;
private JLabel heightLabel;
private JComboBox dayComboBox;
private JLabel dayLabel;
private JComboBox monthComboBox;
private JButton logoButton;
private JPanel logoPanel;
private JRadioButton orientalRadioButton;
private JRadioButton blackRadioButton;
private JRadioButton caucasianRadioButton;
private JRadioButton unspecifiedRaceRadioButton;
private JPanel racePanel;
private JLabel raceLabel;
private JRadioButton unknownRadioButton;
private JRadioButton unspecifiedGenderRadioButton;
private JRadioButton femaleRadioButton;
private JRadioButton maleRadioButton;
private JPanel genderRadioButtonPanel;
private JLabel genderLabel;
private ButtonGroup genderButtonGroup;
private JSpinner millimeterSpinner;
private JLabel millimeterLabel;
private JSpinner meterSpinner;
private JSpinner centimeterSpinner;
private JLabel monthLabel;
private JFormattedTextField secondLastNameFormattedTextField;
private JFormattedTextField lastNameFormattedTextField;
private JComboBox yearComboBox;
private JLabel yearLabel;
private JLabel ageLabel;
private JLabel secondLastName;
private JFormattedTextField firstNameFormattedTextField;
private JPanel patientPanel1;
private JButton endButton;
private JButton deleteButton;
private JFormattedTextField patientIDTextField;
private JButton clearAllTextButton;
private JButton findButton;
private JButton opretJButton;
//private JTextField patientIDTextField();
private JLabel jLabel1;

{
//Set Look & Feel
try {
javax.swing.UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
} catch(Exception e) {
e.printStackTrace();
}
}


/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
PatientDataGui inst = new PatientDataGui();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}

public PatientDataGui() {
super("Rediger patient data");
initGUI();
}

private void initGUI() {
try {
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
getContentPane().setLayout(null);
{
patientPanel1 = new JPanel();
getContentPane().add(patientPanel1);
getContentPane().add(getLogoPanel());
//jLabel1.setIcon(new javax.swing.ImageIcon("oclogo.jpg"));
//logoPanel.add(jLabel1);
//logoButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("oclogo.jpg")));

patientPanel1.setBounds(9, 123, 423, 407);
patientPanel1.setLayout(null);
{
endButton = new JButton();
patientPanel1.add(endButton);
endButton.setText("Afslut");
endButton.setBounds(340, 373, 83, 25);
endButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
YesNoToExit.main(new String[]{});
//System.out.println("endButton.actionPerformed, event="+evt);
//TODO add your code for endButton.actionPerformed
}
});
}
{
deleteButton = new JButton();
patientPanel1.add(deleteButton);
deleteButton.setText("Slet");
deleteButton.setBounds(260, 373, 66, 25);
deleteButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
AccesValidationToDelete.main(new String[]{});
System.out.println("deleteButton.actionPerformed, event="+evt);
//TODO add your code for deleteButton.actionPerformed
}
});
}
{
clearAllTextButton = new JButton();
patientPanel1.add(clearAllTextButton);
clearAllTextButton.setText("Ryd");
clearAllTextButton.setBounds(166, 373, 71, 25);
clearAllTextButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
secondLastNameFormattedTextField.setText("");
System.out.println("clearAllTextButton.actionPerformed, event="+evt);
//TODO add your code for clearAllTextButton.actionPerformed
}
});
}
{
findButton = new JButton();
patientPanel1.add(findButton);
findButton.setText("Find");
findButton.setBounds(90, 373, 71, 25);
}
{
opretJButton = new JButton();
patientPanel1.add(opretJButton);
opretJButton.setText("Opret");
opretJButton.setBounds(7, 373, 78, 25);
}
{
patientIDTextField = new JFormattedTextField();
patientPanel1.add(patientIDTextField);
patientIDTextField.setBounds(110, 32, 289, 19);
patientIDTextField.setText("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx°");
}
{
patientIDLabel = new JLabel();
patientPanel1.add(patientIDLabel);
patientIDLabel.setText("Patient ID:");
patientIDLabel.setBounds(20, 34, 64, 15);
}
{
firstNameLabel = new JLabel();
patientPanel1.add(firstNameLabel);
firstNameLabel.setText("Fornavn:");
firstNameLabel.setBounds(20, 61, 64, 15);
}
{
firstNameFormattedTextField = new JFormattedTextField();
patientPanel1.add(getFirstNameFormattedTextField());
firstNameFormattedTextField.setText("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx°");
firstNameFormattedTextField.setBounds(110, 59, 289, 19);
}
{
lastName = new JLabel();
patientPanel1.add(lastName);
lastName.setText("Efternavn:");
lastName.setBounds(20, 91, 78, 15);
}
{
secondLastName = new JLabel();
patientPanel1.add(getSecondLastName());
secondLastName.setText("Mellemnavn:");
secondLastName.setBounds(20, 119, 90, 15);
}
{
ageLabel = new JLabel();
patientPanel1.add(ageLabel);
ageLabel.setText("F°dselsdag:");
ageLabel.setBounds(20, 165, 78, 15);
}
{
yearLabel = new JLabel();
patientPanel1.add(yearLabel);
yearLabel.setText("┼r");
yearLabel.setBounds(110, 165, 23, 15);
}
{
ComboBoxModel yearComboBoxModel =
new DefaultComboBoxModel(
new String[] { "1850", "1851", "1852", "1853" });
/*Should probably be set, beginning with the birthdate in the lifespan of the
* earliest born person to have an electrocardiogram recording till
* the current year. This list should be generated upon start of the
* interface or possibly be based on a database structure*/
yearComboBox = new JComboBox();
patientPanel1.add(getYearComboBox());
yearComboBox.setModel(yearComboBoxModel);
yearComboBox.setBounds(131, 161, 71, 19);
}
{
lastNameFormattedTextField = new JFormattedTextField();
patientPanel1.add(getJFormattedTextField1());
lastNameFormattedTextField.setText("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx°");
lastNameFormattedTextField.setBounds(110, 89, 289, 19);
}
{
secondLastNameFormattedTextField = new JFormattedTextField();
patientPanel1.add(getSecondLastNameFormattedTextField());
secondLastNameFormattedTextField.setText("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx°");
secondLastNameFormattedTextField.setBounds(110, 117, 289, 19);
}
{
monthLabel = new JLabel();
patientPanel1.add(monthLabel);
monthLabel.setText("Mňned");
monthLabel.setBounds(211, 164, 50, 15);
}
{
ComboBoxModel monthComboBoxModel =
new DefaultComboBoxModel(
new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" });
monthComboBox = new JComboBox();
patientPanel1.add(getMonthComboBox());
monthComboBox.setModel(monthComboBoxModel);
monthComboBox.setBounds(256, 163, 45, 17);
}
{
dayLabel = new JLabel();
patientPanel1.add(getDayLabel());
dayLabel.setText("Dag");
dayLabel.setBounds(310, 164, 31, 15);
}
{
ComboBoxModel dayComboBoxModel =
new DefaultComboBoxModel( // The following should be enclosed in a dateselection panel for reuse reasons - possible made into a yyyymmdd bean

/* IF current monthchosen = Jan, Mar, May Jul, Aug, Okt, Dec - Populate day list with
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" */

/* IF current monthchosen = Apr, Jun, Sep, Nov, Sept, Nov - Populate day list with
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" */

/* if current monthchosen = Feb and year not = leap year - Populate day list with
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28" */

/* if current monthchosen = Feb and year = leap year - Populate day list with
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28" */

//Known leap years since liststart

//However for now we insert a 31 day standard as the month begins with January
new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" });
dayComboBox = new JComboBox();
patientPanel1.add(getDayComboBox());
dayComboBox.setModel(dayComboBoxModel);
dayComboBox.setBounds(341, 162, 46, 17);
}
{
heightLabel = new JLabel();
patientPanel1.add(heightLabel);
heightLabel.setText("H°jde:");
heightLabel.setBounds(20, 197, 39, 15);
}
{
meterLabel = new JLabel();
patientPanel1.add(meterLabel);
meterLabel.setText("m");
meterLabel.setBounds(110, 197, 15, 15);
}
{
centimeterLabel = new JLabel();
patientPanel1.add(centimeterLabel);
centimeterLabel.setText("cm");
centimeterLabel.setBounds(183, 196, 25, 15);
}
{
SpinnerListModel centimeterSpinnerModel =
new SpinnerListModel(
new String[] { "0", "01" ,"02" ,"03" ,"04" ,"05" ,"06" ,"07" ,"08" ,"09" ,"10" ,"11" ,"12" ,"13" ,"14" ,"15" ,"16" ,"17" ,"18" ,"19" , "20" ,"21" ,"22" ,"23" ,"24" ,"25" ,"26" ,"27" ,"28" ,"29" ,"30" ,"31" ,"32" ,"33" ,"34" ,"35" ,"36" ,"37" ,"38" ,"39" ,"40" ,"41" ,"42" ,"43" ,"44" ,"45" ,"46" ,"47" ,"48" ,"49" ,"50" ,"51" ,"52" ,"53" ,"54" ,"55" ,"56" ,"57" ,"58" ,"59" ,"60", "61" ,"62" ,"63" ,"64" ,"65" ,"66" ,"67" ,"68" ,"69" ,"70" ,"71" ,"72" ,"73" ,"74" ,"75" ,"76" ,"77" ,"78" ,"79" ,"80" ,"81" ,"82" ,"83" ,"84" ,"85" ,"86" ,"87" ,"88" ,"89" ,"90" ,"91" ,"92" ,"93" ,"94" ,"95" ,"96" ,"97" ,"98" ,"99"
});
centimeterSpinner = new JSpinner();
patientPanel1.add(getCentimeterSpinner());
centimeterSpinner.setModel(centimeterSpinnerModel);
centimeterSpinner.setBounds(205, 195, 54, 17);
centimeterSpinner.getEditor().setPreferredSize(new java.awt.Dimension(33, 13));
}
{
SpinnerListModel meterSpinnerModel =
new SpinnerListModel(
new String[] { "0", "1" , "2" });
meterSpinner = new JSpinner();
patientPanel1.add(getMeterSpinner());
meterSpinner.setModel(meterSpinnerModel);
meterSpinner.setBounds(127, 195, 45, 17);
}
{
millimeterLabel = new JLabel();
patientPanel1.add(millimeterLabel);
millimeterLabel.setText("mm");
millimeterLabel.setBounds(269, 196, 29, 15);
}
{
SpinnerListModel millimeterSpinnerModel =
new SpinnerListModel(
new String[] { "0", "01" ,"02" ,"03" ,"04" ,"05" ,"06" ,"07" ,"08" ,"09" });
millimeterSpinner = new JSpinner();
patientPanel1.add(getMillimeterSpinner());
millimeterSpinner.setModel(millimeterSpinnerModel);
millimeterSpinner.setBounds(295, 195, 45, 16);
millimeterSpinner.getEditor().setPreferredSize(new java.awt.Dimension(30, 12));
}
{
genderLabel = new JLabel();
patientPanel1.add(genderLabel);
genderLabel.setText("K°n:");
genderLabel.setBounds(20, 246, 39, 15);
}
{
genderRadioButtonPanel = new JPanel();
patientPanel1.add(genderRadioButtonPanel);
patientPanel1.add(getRaceLabel());
patientPanel1.add(getRacePanel());
genderRadioButtonPanel.setBounds(100, 236, 318, 33);
genderRadioButtonPanel.setLayout(null);
{
maleRadioButton = new JRadioButton();
genderRadioButtonPanel.add(maleRadioButton);
maleRadioButton.setText("Mand");
maleRadioButton.setBounds(184, 8, 61, 23);
}
{
femaleRadioButton = new JRadioButton();
genderRadioButtonPanel.add(femaleRadioButton);
femaleRadioButton.setText("Kvinde");
femaleRadioButton.setBounds(118, 8, 69, 23);
}
{
unspecifiedGenderRadioButton = new JRadioButton();
genderRadioButtonPanel.add(unspecifiedGenderRadioButton);
unspecifiedGenderRadioButton.setText("Uspecificeret");
unspecifiedGenderRadioButton.setBounds(7, 8, 107, 23);
}
{
unknownRadioButton = new JRadioButton();
genderRadioButtonPanel.add(unknownRadioButton);
unknownRadioButton.setText("Ukendt");
unknownRadioButton.setBounds(247, 8, 72, 23);
}
}

}
pack();
this.setSize(460, 560);
} catch (Exception e) {
e.printStackTrace();
}
}

public JTextField getPatientIDTextField() {
return patientIDTextField;
}

public JButton getOpretJButton() {
return opretJButton;
}

public JButton getFindButton() {
return findButton;
}

public JButton getClearAllTextButton() {
return clearAllTextButton;
}

public JFormattedTextField getPatientIDTextFieldx() {
return patientIDTextField;
}

public JButton getEndButton() {
return endButton;
}

public JFormattedTextField getFirstNameFormattedTextField() {
return firstNameFormattedTextField;
}

public JLabel getSecondLastName() {
return secondLastName;
}

public JComboBox getYear() {
return Year;
}

public JList getYearList() {
return yearList;
}

public JComboBox getYearComboBox() {
return yearComboBox;
}

public JFormattedTextField getJFormattedTextField1() {
return lastNameFormattedTextField;
}

public JFormattedTextField getSecondLastNameFormattedTextField() {
return secondLastNameFormattedTextField;
}

public JComboBox getMonthComboBox() {
return monthComboBox;
}

public JLabel getDayLabel() {
return dayLabel;
}

public JComboBox getDayComboBox() {
return dayComboBox;
}

public JComboBox getMeterComboBox() {
return meterComboBox;
}

public JSpinner getCentimeterSpinner() {
return centimeterSpinner;
}

public JSpinner getMeterSpinner() {
return meterSpinner;
}

public JSpinner getMillimeterSpinner() {
return millimeterSpinner;
}

public ButtonGroup getGenderButtonGroup() {
if(genderButtonGroup == null) {
genderButtonGroup = new ButtonGroup();
}
return genderButtonGroup;
}

private JLabel getRaceLabel() {
if(raceLabel == null) {
raceLabel = new JLabel();
raceLabel.setText("Race:");
raceLabel.setBounds(20, 283, 39, 15);
}
return raceLabel;
}

private JPanel getRacePanel() {
if(racePanel == null) {
racePanel = new JPanel();
racePanel.setBounds(90, 275, 333, 65);
racePanel.setLayout(null);
racePanel.add(getJRadioButton1());
racePanel.add(getCaucasianRadioButton());
racePanel.add(getBlackRadioButton());
racePanel.add(getOrientalRadioButton());
}
return racePanel;
}

private JRadioButton getJRadioButton1() {
if(unspecifiedRaceRadioButton == null) {
unspecifiedRaceRadioButton = new JRadioButton();
unspecifiedRaceRadioButton.setText("Unspecifceret");
unspecifiedRaceRadioButton.setBounds(17, 7, 111, 23);
}
return unspecifiedRaceRadioButton;
}

private JRadioButton getCaucasianRadioButton() {
if(caucasianRadioButton == null) {
caucasianRadioButton = new JRadioButton();
caucasianRadioButton.setText("Caucasian");
caucasianRadioButton.setBounds(126, 7, 96, 23);
}
return caucasianRadioButton;
}

private JRadioButton getBlackRadioButton() {
if(blackRadioButton == null) {
blackRadioButton = new JRadioButton();
blackRadioButton.setText("Black");
blackRadioButton.setBounds(233, 7, 65, 23);
}
return blackRadioButton;
}

private JRadioButton getOrientalRadioButton() {
if(orientalRadioButton == null) {
orientalRadioButton = new JRadioButton();
orientalRadioButton.setText("Oriental");
orientalRadioButton.setBounds(17, 36, 82, 23);
}
return orientalRadioButton;
}

private JPanel getLogoPanel() {
if(logoPanel == null) {
logoPanel = new JPanel();
logoPanel.setBounds(9, 21, 429, 116);
logoPanel.setLayout(null);
logoPanel.add(getLogoButton());
}
return logoPanel;
}

private JButton getLogoButton() {
if(logoButton == null) {
logoButton = new JButton(new ImageIcon("oclogo.png"));
logoButton.setBounds(30, 10, 370, 95);
logoButton.setText("LOGOBUTTON TEXT");
}
return logoButton;




}


}

Last edited by Nimoy; 10-31-2007 at 06:20 PM. Reason: minor corrections
 
Old 10-31-2007, 06:44 PM   #2
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Test if this works for you:
Code:
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ImageIcon;
import javax.swing.WindowConstants;

public class TestButton {
  public static void main(String argv[]) {
    JFrame frame = new JFrame("Test frame");
    frame.setBounds(300, 300, 620, 620);
    frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    JPanel panel = new JPanel();
    JButton button1 = new JButton("Test button 1", new ImageIcon("logo.jpg"));
    JButton button2 = new JButton("Test button 2");
    panel.add(button1);
    panel.add(button2);
    frame.getContentPane().add(panel);
    frame.setVisible(true);
  }
}
 
Old 11-01-2007, 05:10 AM   #3
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Original Poster
Rep: Reputation: 30
Nope the same result as my own attempts

I see the Image in editor mode - But once it is run the image is not visible... Same story when I had a friend test it in windows....
 
Old 11-01-2007, 06:22 AM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I suggest to reduce the amount of code you use to just adding the button with icon in initGUI and check if this button shows up or not. Btw, why do you try without catch? Try without catch or finally should give compile time error.

Last edited by Alien_Hominid; 11-01-2007 at 06:27 AM.
 
Old 11-01-2007, 10:03 AM   #5
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 15.04
Posts: 336

Original Poster
Rep: Reputation: 30
Simplified

Code:
/* Same result - As soon as I attemt to put an image on the button - Nothing or Crash n' Burn - Another ninteresting side effect is that frames are minimized into a small blob when run. */

import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NewJFrame extends javax.swing.JFrame {

{
//Set Look & Feel
try {
			javax.swing.UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
} catch(Exception e) {
e.printStackTrace();
}
	}

	private JPanel jPanel1;
	private JButton jButton1;
	private JPanel jPanel2;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				NewJFrame inst = new NewJFrame();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public NewJFrame() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jPanel2 = new JPanel();
				getContentPane().add(jPanel2, BorderLayout.CENTER);
				jPanel2.setPreferredSize(new java.awt.Dimension(476, 150));
				{
					jPanel1 = new JPanel();
					jPanel2.add(jPanel1);
					jPanel1.setPreferredSize(new java.awt.Dimension(480, 155));
					jPanel1.setLayout(null);
					{
						jButton1 = new JButton();
						jPanel1.add(jButton1);
						jButton1.setText("jButton1");
						jButton1.setBounds(194, 69, 93, 23);
						//jButton1.setIcon(new ImageIcon(getClass().getClassLoader().getResource("//oclogo.jpg")));
						//jButton1.setOpaque(false/true);
					}
				}
			}
			pack();
			this.setSize(486, 180);
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
 
Old 11-01-2007, 12:10 PM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
I have just noticed that you're using a GUI builder. This can cause problems. Try to comment this out: //jPanel1.setLayout(null);
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I do a complete mirror image with a dual boot system? dpuane Linux - Laptop and Netbook 1 10-06-2006 04:26 PM
Sama SUSE 10 beta 4 doesnt show windows complete file list 1kyle SUSE / openSUSE 0 09-09-2005 06:59 AM
complete source code. bruse Linux - Newbie 3 08-29-2005 07:10 PM
show complete current paht creilar Linux - Newbie 1 05-24-2004 05:50 AM
Making complete image of installation PurpleMotion Linux - Software 1 02-20-2004 09:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration