public HardwarePanelElement(String elementName, Frame myFrame, JPanel elementPanel) {
		super( );
		this.myFrame = myFrame;
		
		this.elementName = elementName;
		GridBagConstraints c = new GridBagConstraints();
		c.fill = GridBagConstraints.BOTH;
		c.gridy = GridBagConstraints.RELATIVE;
		c.gridx = GridBagConstraints.RELATIVE;
		c.insets = new Insets (2, 2, 2, 2);
		
		if (elementName.isEmpty()) {
			elementPanel.add (new JLabel ("Hardware"), c);
			elementPanel.add (new JLabel ("Function"), c);
			elementPanel.add (new JLabel ("Setting"), c);
			elementPanel.add (new JLabel ("Summary"), c);
		}
		else {
			c.gridx = 0;
			elementPanel.add (new JLabel (" "+elementName),c);
			functionSelectionBox = new JComboBox<HardwareFunctionType> ();

			if (elementName.contains ("backlight")) {
				for (int i = 0; i < HardwareFunctionType.backLightFunctionTypes.length; i++) {
					HardwareFunctionType h = new HardwareFunctionType (HardwareFunctionType.backLightFunctionTypes[i]);
					functionSelectionBox.addItem(h);
					if (elementName.contains("active"))
						h.setDefaultBacklight(100);
					else if (elementName.contains("idle"))
						h.setDefaultBacklight(6);
					else if (elementName.contains("control"))
						h.setDefaultBacklightTime(30);
				}
			}
			else if (elementName.contains ("PE1")) {
				for (int i = 0; i < HardwareFunctionType.PE1functionTypes.length; i++) {
					functionSelectionBox.addItem(new HardwareFunctionType (HardwareFunctionType.PE1functionTypes[i]));
				}
			}
			else {
				for (int i = 0; i < HardwareFunctionType.functionTypes.length; i++) {
					functionSelectionBox.addItem(new HardwareFunctionType (HardwareFunctionType.functionTypes[i]));
				}		
			}
			c.gridx = 1;
			elementPanel.add (functionSelectionBox, c);
			setupButton = new JButton ("Setup");
			setupButton.setEnabled(((HardwareFunctionType) functionSelectionBox.getSelectedItem()).hasParameters());
			setupButton.addActionListener(this);
			c.gridx = 2;
			elementPanel.add (setupButton, c);
			parameterLabel = new JLabel ( ((HardwareFunctionType) functionSelectionBox.getSelectedItem()).getFunctionParameters() );
			c.gridx = 3;
			elementPanel.add (parameterLabel, c);
//FIXME: this is a trial
//			elementPanel.add(Box.createHorizontalGlue());
		
			functionSelectionBox.addItemListener(this);
		}
	}