public BuilderDisplay(){
		editingExisting = false;
		widgetList = new ArrayList<JComponent>(10);
		currentQuestionString = "";
		newWidget = false;
		panel = new JPanel();
		builderBody = new JPanel();
		loaderBody = new JPanel();
		//activeBuildingPanel = new JPanel();
		buildingPanel = new JPanel();
		previewPanel = new JPanel();
		previewAdapter = new PreviewPanelAdapter();
		
		JPanel contentPanel = new JPanel();
		
		previewPanel.setLayout(new GridLayout(8,1));
		previewPanel.setBorder(BorderFactory.createLineBorder(Color.black));
		
		builderBody.setSize(600,300);
		builderBody.setBorder(BorderFactory.createLineBorder(Color.black));
		
		//Loader setup
		loaderBody.setSize(600,300);
		loaderBody.setBorder(BorderFactory.createLineBorder(Color.black));

		JPanel loaderPanel = new JPanel();
		loaderPanel.setSize(600,300);
		loaderPanel.setLayout(new GridLayout(2,1));
		JPanel leftLoaderPanel = new JPanel();
		JPanel rightLoaderPanel = new JPanel();
		rightLoaderPanel.setSize(300,300);
		leftLoaderPanel.setLayout(new GridLayout(4,1));
		leftLoaderPanel.setSize(300,300);
		JButton loaderAddFollowupButton = new JButton("Add Followup Question");
		JButton loaderSaveQuestionSetButton = new JButton("Save Question Set");
		JButton loaderLoadQuestionSetButton = new JButton("Load Question Set");
		JButton loaderNewQuestionSetButton = new JButton("New Question Set");
		leftLoaderPanel.add(loaderAddFollowupButton);
		leftLoaderPanel.add(loaderSaveQuestionSetButton);
		leftLoaderPanel.add(loaderLoadQuestionSetButton);
		leftLoaderPanel.add(loaderNewQuestionSetButton);
		rightLoaderPanel.add("Center", new JLabel("this is a placeholder"));
		loaderBody.add(leftLoaderPanel);
		loaderBody.add(rightLoaderPanel);
		//loader setup finished
		
		
		this.setSize(600,600);
		this.setLayout(new GridLayout(2,1));
		this.add(builderBody);
		this.add(loaderBody);

		GridLayout twoColumnGrid = new GridLayout(1,2);
		
		labelPanel = new JPanel();
		labelPanel.setLayout(twoColumnGrid);
		widgetLabel = new JLabel("Label:");
		widgetLabelText = new JTextField();
		labelPanel.add(widgetLabel);
		labelPanel.add(widgetLabelText);
		
		minValuePanel = new JPanel();
		minValuePanel.setLayout(twoColumnGrid);
		widgetMinValueLabel = new JLabel("Minimum value:");
		widgetMinValueText = new JTextField();
		minValuePanel.add(widgetMinValueLabel);
		minValuePanel.add(widgetMinValueText);
		
		maxValuePanel = new JPanel();
		maxValuePanel.setLayout(twoColumnGrid);
		widgetMaxValueLabel = new JLabel("Maximum value:");
		widgetMaxValueText = new JTextField();
		maxValuePanel.add(widgetMaxValueLabel);
		maxValuePanel.add(widgetMaxValueText);
		
		defaultValuePanel = new JPanel();
		defaultValuePanel.setLayout(twoColumnGrid);
		widgetDefaultValueLabel = new JLabel("Default Value:");
		widgetDefaultValueText =new JTextField();
		defaultValuePanel.add(widgetDefaultValueLabel);
		defaultValuePanel.add(widgetDefaultValueText);
		
		widgetAddButton = new JButton("Add widget");
		widgetSaveButton = new JButton("Save widget");
		widgetDeleteButton = new JButton("Delete widget");
		
		buildingPanel.setLayout(new GridLayout(7,1));
		buildingPanel.add(labelPanel);
		buildingPanel.add(minValuePanel);
		buildingPanel.add(maxValuePanel);
		buildingPanel.add(defaultValuePanel);
		//buildingPanel.add(widgetLabelText);
		buildingPanel.add(widgetAddButton);
		
		/////////ADD BUTTON/////////////////////////////////////////////////////
		widgetAddButton.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent e) {
				previewPanel.setVisible(false);

				if(currentWidget instanceof JButton){
					JButton buttonTemp = new JButton();
					buttonTemp = (JButton) currentWidget;
					widgetList.add(buttonTemp);
					disableComponentAndAddMouseListener(buttonTemp);
					buttonTemp.setText(widgetLabelText.getText());
				} else if(currentWidget instanceof SliderWrapper){
					SliderWrapper sliderTemp = new SliderWrapper();
					sliderTemp = (SliderWrapper) currentWidget;
					widgetList.add(sliderTemp);
					disableComponentAndAddMouseListener(sliderTemp);
					//sliderTemp.setText(widgetLabelText.getText());
					sliderTemp.setMaximum(Integer.parseInt(widgetMaxValueText.getText()));
					sliderTemp.setMinimum(Integer.parseInt(widgetMinValueText.getText()));
					sliderTemp.setValue(Integer.parseInt(widgetDefaultValueText.getText()));
				} else if(currentWidget instanceof JToggleButton){
					JToggleButton buttonTemp = new JToggleButton();
					buttonTemp = (JToggleButton) currentWidget;
					widgetList.add(buttonTemp);
					disableComponentAndAddMouseListener(buttonTemp);
					buttonTemp.setText(widgetLabelText.getText());
					buttonTemp.setSelected(widgetDefaultValueText.equals("1"));
				}
				
				

				generatePreviewPanel();
				buildingPanel.setVisible(false);	
			}});
		
		
		//SAVE BUTTON*******************************************************
		widgetSaveButton.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent arg0) {
				if(currentWidget instanceof JButton){
					System.out.println("is button in save");
					JButton temp = (JButton)currentWidget;
					temp.setText(widgetLabelText.getText());
					disableComponentAndAddMouseListener(temp);
					widgetList.set(currentActiveWidgetNumber, temp);
				} else if(currentWidget instanceof SliderWrapper){
					System.out.println("is slider in save");
					SliderWrapper temp = (SliderWrapper)currentWidget;
					temp.setWidgetLabel(widgetLabelText.getText());
					temp.setMaxWidgetValue(widgetMaxValueText.getText());
					temp.setMinWidgetValue(widgetMinValueText.getText());
					temp.setWidgetDefaultValue(widgetDefaultValueText.getText());
					
					disableComponentAndAddMouseListener(temp);
					widgetList.set(currentActiveWidgetNumber, temp);
				} else if(currentWidget instanceof JToggleButton){
					System.out.println("is toggle in save");
					JToggleButton temp = (JToggleButton)currentWidget;
					temp.setText(widgetLabelText.getText());
					temp.setSelected(widgetDefaultValueText.getText().equals("1"));
					
					disableComponentAndAddMouseListener(temp);
					widgetList.set(currentActiveWidgetNumber, temp);
				}
				generatePreviewPanel();
			}});
		
		//DELETE BUTTON============================================================
		widgetDeleteButton.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent arg0) {
				widgetList.remove(currentActiveWidgetNumber);
				generatePreviewPanel();
				clearBuilderObjects();
			}
			
		});
		
		JList list = new JList(new AbstractListModel() {
		
		      String[] widgets = {"Button", "Toggle Button", "Jeopardy Button", "Slider", "Textbox", "Text Question", "QR Text", "Combo Box", "TextView with Button", "TextView"};
		      @Override
		      public int getSize() {
		      return widgets.length;
		      }

		      @Override
		      public Object getElementAt(int index) {
		      return widgets[index];
		      }
		      });
		
		list.addMouseListener(new ActionJList(list));
		panel.add(list);
		builderBody.add("Center", contentPanel);
		
		contentPanel.setBorder(BorderFactory.createLineBorder(Color.black));
		GridLayout gl = new GridLayout(1,3);
		
		contentPanel.setLayout(new GridLayout(1,3));
		contentPanel.setSize(600,300);
		contentPanel.add( panel);
		contentPanel.add( buildingPanel);
		contentPanel.add(previewPanel);

		buildingPanel.setVisible(false);
		this.setVisible(true);
	}