Source:
<code>public DineroSingleCachePanel(char type, int level) { dco = new DineroCacheOptions(type, level); <START> String[] sizes = {"1", "2", "4", "8", "16", "32", "64", "128", "256", "512"}; <END> String[] units = {" ", "k", "M", "G"}; size = new JComboBox(sizes); bsize = new JComboBox(sizes); sizeUnit = new JComboBox(units); bsizeUnit = new JComboBox(units); assoc = new JTextField(); ccc = new JCheckBox(); cacheSizeLabel = new JLabel("Cache size"); cacheSizeUnitLabel = new JLabel("Unit (Byte)"); blockSizeLabel = new JLabel("Block size"); bsizeUnitLabel = new JLabel("Unit (Byte)"); assocLabel = new JLabel("N way set associative"); cccLabel = new JLabel("CCC Enable"); size.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ sizeUnit.setSelectedIndex(0); } }); size.setSelectedIndex(0); bsize.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ bsizeUnit.setSelectedIndex(0); } }); bsize.setSelectedIndex(0); sizeUnit.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { String sizeMsg = String.valueOf(size.getSelectedItem()); dco.size = sizeMsg + String.valueOf(sizeUnit.getSelectedItem()); } }); sizeUnit.setSelectedIndex(0); bsizeUnit.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ String bsizeMsg = String.valueOf(bsize.getSelectedItem()); dco.bsize = bsizeMsg + String.valueOf(bsizeUnit.getSelectedItem()); } }); bsizeUnit.setSelectedIndex(0); setBorder(BorderFactory.createTitledBorder("Level " + level + " cache (" + type + ")")); setLayout(new GridLayout(2, 6, 1, 1)); add(cacheSizeLabel); add(cacheSizeUnitLabel); add(blockSizeLabel); add(bsizeUnitLabel); add(assocLabel); add(cccLabel); add(size); add(sizeUnit); add(bsize); add(bsizeUnit); add(assoc); add(ccc); setPreferredSize(new Dimension(850, 80)); setMaximumSize(new Dimension(850, 90)); setMinimumSize(new Dimension(850, 50)); }</code><technical_language>Consider making arrays static final members of class</technical_language>

Target:
public DineroSingleCachePanel(char type, int level) { dco = new DineroCacheOptions(type, level); final String[] sizes = {"1", "2", "4", "8", "16", "32", "64", "128", "256", "512"}; final String[] units = {" ", "k", "M", "G"}; size = new JComboBox<String>(sizes); bsize = new JComboBox<String>(sizes); sizeUnit = new JComboBox<String>(units); bsizeUnit = new JComboBox<String>(units); assoc = new JTextField(); ccc = new JCheckBox(); cacheSizeLabel = new JLabel("Cache size"); cacheSizeUnitLabel = new JLabel("Unit (Byte)"); blockSizeLabel = new JLabel("Block size"); bsizeUnitLabel = new JLabel("Unit (Byte)"); assocLabel = new JLabel("N way set associative"); cccLabel = new JLabel("CCC Enable"); size.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ sizeUnit.setSelectedIndex(0); } }); size.setSelectedIndex(0); bsize.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ bsizeUnit.setSelectedIndex(0); } }); bsize.setSelectedIndex(0); sizeUnit.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { String sizeMsg = String.valueOf(size.getSelectedItem()); dco.size = sizeMsg + String.valueOf(sizeUnit.getSelectedItem()); } }); sizeUnit.setSelectedIndex(0); bsizeUnit.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ String bsizeMsg = String.valueOf(bsize.getSelectedItem()); dco.bsize = bsizeMsg + String.valueOf(bsizeUnit.getSelectedItem()); } }); bsizeUnit.setSelectedIndex(0); setBorder(BorderFactory.createTitledBorder("Level " + level + " cache (" + type + ")")); setLayout(new GridLayout(2, 6, 1, 1)); add(cacheSizeLabel); add(cacheSizeUnitLabel); add(blockSizeLabel); add(bsizeUnitLabel); add(assocLabel); add(cccLabel); add(size); add(sizeUnit); add(bsize); add(bsizeUnit); add(assoc); add(ccc); setPreferredSize(new Dimension(850, 80)); setMaximumSize(new Dimension(850, 90)); setMinimumSize(new Dimension(850, 50)); }