Galera, não estou conseguindo chamar o JOptionPane
em nenhuma classe no eclipse, tentei no Netbeans, e rodou normal. Alguém ai pode saber o que pode ser?
Mensagem de erro:
Multiple markers at this line - Access restriction: The type JOptionPane is not accessible due to restriction on required library C: \Program Files\Java\jre1.8.0_73\lib\rt.jar - Access restriction: The method showMessageDialog(Component, Object) from the type JOptionPane is not accessible due to restriction on required library C:\Program Files\Java\jre1.8.0_73\lib\rt.jar
Código:
package br.projeto.model;
import javax.swing.*;
public class Caixa {
Cliente client = new Cliente();
public void showAvaibleBalance(Cliente client){
client.getBalance();
}
public void makeLoot(Cliente client, double value){
if((value > 0)&&(value < client.getBalance())){
client.setBalance(client.getBalance()-value);
}else if (value < 0){
JOptionPane.showMessageDialog(null, "");
}
}
}