private void deletePlaylist() { playlist = new Playlist(); playlist.setPlaylistName(playlist_name); if (playlistController.deleteDateFromTable(playlist)) JOptionPane.showMessageDialog(null, "Deleted Success"); else JOptionPane.showMessageDialog(null, "Faild"); resetPlaylist(); }
private DefaultTableModel tableModel() { defaultTableModel = new DefaultTableModel(); defaultTableModel.addColumn("NamePlaylist"); defaultTableModel.addColumn("Button_Play"); defaultTableModel.addColumn("Button_Delete"); defaultTableModel.addColumn("Like"); // defaultTableModel.addColumn("Point"); ArrayList<String> arrayList = null; arrayList = playlistController.getAllDataPlaylistForPage(0, 10, UserController.userIns); for (int i = 0; i < arrayList.size(); i++) { String playlist_arr[] = arrayList.get(i).split(":"); defaultTableModel.addRow(new Object[] {playlist_arr[0], "Play", "Delete", playlist_arr[1]}); } return defaultTableModel; }
private void playPlaylistOpen() { Playlist pl = new Playlist(); pl.setPlaylistName(playlist_name.split(":")[0]); playlistController.upCountDisplay(pl.getPlaylistID()); FrameMain.getInstane().addFramePlaySongInPlaylist(playlistController.getIDByPlaylistName(pl)); }