콤보 상자에서 값을 가져 와서 메서드에 삽입하고 싶습니다. 내 문제는 메서드는 Node 형식의 변수를 사용해야합니다.자바 netbeans 양식 - 콤보 상자에서 값을 받아
ShortestPath.computeRoutes(jComboBoxDepFrom.getSelectedItem().toString());
나는 다음과 같은 오류가 위의 코드하려고 할 때 :
method computeRoutes in class busplanner.ShortestPath cannot be applied to given types; required: busplanner.Node found: java.lang.String reason: actual argument java.lang.String cannot be converted to busplanner.Node by method invocation conversion
[SSCCE] (http://sscce.org/)로 질문을 수정하십시오. – mKorbel
Node 클래스에 문자열을 사용하는 생성자 나 설정자가 없습니까? – THelper