11.27.17

jtogglebutton jradiobutton - on or off, goes in group italic = new JCheckBox("Italic"); add buton make group (Behind scenes) public void itemStateChanged(ItemEvent ie) { if (ie.getSource() == bold) valBold } one starts out as true when a new one is selected, the other is unselected itemlistener Npanel.add///derp JList Multiple things for user to select populaed by providing array of (strings, ints, double) to appear in the JList JList must line up between two arrays {"Black"} array 1, {Color.BLACK} array 2 add(new JScrollPane(colorList)); colorList.setVisibleRowCount(5); colorLis.addListSelecionLisener(new List) { public valueChanged(ListSelectionEvent event) { getContentPane().setBackround(colors[colorList.getSelectedIndex()]); } } //Better way to code. Snag index first, then index int index = colorList.getSelectedIndex() getContentPane().setBackround(colors[index]); index within index ~~~~ (Match) NumberFormat moneyfmt = NumberForma.getCurancyInstance(Locale.US); --- indices = ~~~~~~~.getSelectedIndices ---------- display for int = 0; i less than indices.lengh; i++ //////////// ----------------- JSlider - basically a ruler - Divise slider any way i want Drag & Drop event - deselect & it will click addChangeListener add to panel last stateChanged { size = jsl.getValue(); } ---------------- JComboBox ItemListener if has been selected pass in true ------------------ Event handling internal ------------------ use GridLayout inside Borderlayout ------------------ jbuttons right radio lef slider down belw slider up top I find my own pictures, only send project not pictures TeamData, p4? ------------------- int index = 0; while(tok.hasMoreTokens()) { try { keyString = tok.nextToken(); System.out.println("token is " + keyString); intArray[index] = Integer.parseInt(keyString); index++; } catch(ArrayIndexOutOfBoundsException e) { //2 2 2 2 2 2 2 2 2 2 2 fdbkField.setText("too many tokens! " + e.toString()); System.out.println("too many tokens! " + e.toString() ); } catch(NumberFormatException e) { //2 2 2 2 2.5 2 2 2 2 2 2 fdbkField.setText("Decimal Errors! " + e.toString()); System.out.println("Decimal Errors! " + e.toString() ); } } //2 2 2 2 2.5 2 2 2 2 2 2 //2 2 2 2 2 2 2 2 2 2 2