java - I get some wired error with JOptionPane it says IllegalArgumentException -
i tried gui myself , found example on youtube 1 using it. works on screen not on computer.
this code example
sp_conversation.sethorizontalscrollbarpolicy(scrollpaneconstants.horizontal_scrollbar_never); sp_conversation.setverticalscrollbarpolicy(scrollpaneconstants.vertical_scrollbar_always); sp_conversation.setviewportview(ta_conversation); mainwindow.getcontentpane().add(sp_conversation); sp_conversation.setbounds(10, 90, 330, 180);
it says this
exception in thread "main" java.lang.illegalargumentexception: invalid horizontalscrollbarpolicy @ javax.swing.jscrollpane.sethorizontalscrollbarpolicy(unknown source)
and kinda new this, dont know
can change constants jscrollpane below , see if works.
sp_conversation.sethorizontalscrollbarpolicy(jscrollpane.horizontal_scrollbar_always); sp_conversation.setverticalscrollbarpolicy(jscrollpane.vertical_scrollbar_always);
Comments
Post a Comment