Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class playlistAttr {
- private String nome;
- public static ArrayList<playlistAttr> playlist = new ArrayList<>();
- public String getNome() {
- return this.nome;
- }
- public void setNome(String nome) {
- this.nome = nome;
- }
- public playlistAttr(String nome) {
- this.nome = nome;
- }
- public static void criarPlaylist(String nome_playlist){
- if (!nome_playlist.equals("")){
- playlistAttr criar = new playlistAttr(nome_playlist);
- playlist.add(criar);
- JOptionPane.showMessageDialog(null,"Playlist criada com sucesso!!!");
- }
- }
- public static void setPlaylistComboBox(JComboBox recebe){
- for (int i = 0; i < playlist.size(); i++) {
- recebe.addItem(playlist.get(i).getNome());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement