Skip to content

Commit 8f79407

Browse files
Merge pull request #80 from EatSleepProgramRepeat/73-cdstub-searches-dont-have-track-numbers
did it ig
2 parents c3c5aa3 + f190b53 commit 8f79407

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/main/java/com/CDPrintable/ProgramWindow.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private JPanel searchPanel() {
130130
trackListPanel.setBorder(BorderFactory.createTitledBorder("Search Results"));
131131

132132
// Search table set up
133-
JTable searchTable = new JTable(getTableModel("CDStub"));
133+
JTable searchTable = new JTable(getTableModel("Release"));
134134
searchTable.addMouseListener(new MouseAdapter() {
135135
@Override
136136
public void mouseClicked(MouseEvent e) {
@@ -156,7 +156,12 @@ public void mouseClicked(MouseEvent e) {
156156
JTextField artistField = new JTextField(15);
157157

158158
// Search type combo box setup
159-
JComboBox<String> searchTypeComboBox = new JComboBox<>(new String[] {"CDStub", "Artist", "Release"});
159+
JComboBox<String> searchTypeComboBox = new JComboBox<>(new String[] {"Release", "Artist", "CDStub"});
160+
searchTypeComboBox.addActionListener(_ -> {
161+
if (searchTypeComboBox.getSelectedItem() != null && searchTypeComboBox.getSelectedItem().equals("CDStub")) {
162+
JOptionPane.showMessageDialog(null, "CDStubs do not have track numbers. Because of this, they will all be shown as track 0.", "Warning", JOptionPane.WARNING_MESSAGE);
163+
}
164+
});
160165

161166
// Search button and event listener setup
162167
JButton searchButton = new JButton("Search");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Application version.
22

33
# MAJOR MINOR PATCH
4-
version=2.2.1
4+
version=2.2.2

0 commit comments

Comments
 (0)