Skip to content

Instantly share code, notes, and snippets.

@ggalmazor
Last active March 20, 2018 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggalmazor/367f05492e5efdfd81145a7bef1d42df to your computer and use it in GitHub Desktop.
Save ggalmazor/367f05492e5efdfd81145a7bef1d42df to your computer and use it in GitHub Desktop.
Indirection without abstraction - Snippet 1
public class ExportPanelForm {
private JLabel exportingLabel;
public void updateExportingLabel() {
String text = exportingLabel.getText();
if (text.equals("Exporting..........")) {
text = "Exporting.";
} else {
text += ".";
}
exportingLabel.setText(text);
}
public void showExporting() {
exportingLabel.setText("Exporting.");
exportingLabel.setVisible(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment