List of usage examples for java.lang Character digit
public static int digit(int codePoint, int radix)
From source file:de.main.sessioncreator.DesktopApplication1View.java
private void cleanupReviewPanel() { for (int i = 0; i < reviewCmbxSessiontoReview.getItemCount(); i++) { if (reviewCmbxSessiontoReview.getItemAt(i) .equals(reviewCmbxSessiontoReview.getSelectedItem().toString())) { reviewCmbxSessiontoReview.removeItemAt(i); break; }//ww w .ja v a2 s . com } reviewCmbxSessiontoReview.setSelectedIndex(0); Component[] compo = reviewtoReviewPanel.getComponents(); for (Component c : compo) { if (c instanceof JLabel) { JLabel jl = (JLabel) c; if (jl.getText().contains(reviewtfNameOfTester.getText())) { char nc; String text = jl.getText(); nc = text.charAt(jl.getText().lastIndexOf(":") + 2); int no = Character.digit(nc, 10); no--; jl.setText(text.replace(text.charAt(text.lastIndexOf(":") + 2), Character.forDigit(no, 10))); reviewtoReviewPanel.revalidate(); reviewtoReviewPanel.repaint(); break; } } } reviewtaCharterdynamic.setText(""); reviewtaTestsessionAreasReview.setText(""); reviewLblStartTime.setText(""); reviewtfNameOfTester.setText(""); reviewtfDuration.setText(""); reviewtfSessionSetup.setText(""); reviewtfTestDesignExecution.setText(""); reviewtfBugInvestigation.setText(""); reviewtfCharter.setText(""); reviewtaDataFiles.setText(""); reviewtaTestNotes.setText(""); reviewedipaneBugs.setText(""); reviewtaIssues.setText(""); reviewtaReview.setText(""); }