0
我想從組合框中取值並將其插入方法中。我的問題是該方法需要採取類型節點的變量。Java 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 2012-04-23 11:43:03
沒有一個構造函數或設置在Node類中接受一個字符串? – THelper 2012-04-26 10:40:32