Well, I'm not able to call JOptionPane
in any class in eclipse, I tried Netbeans, and it ran normal. Can anyone here know what it can be?
Error message:
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
Code:
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, "");
}
}
}