The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Java Code
Posted by: Elton | January 28, 2011 @ 12:17am
Java Code
[
Download
]
if(DLS.isEmpty()) { ((DefaultTableModel)DisplayTable.getModel()).setRowCount(1); } else { while(wt != null) { if(wt.getData().getCountry().equals(SearchCountryText.getText()) && wt.getData().getYearOfBottle() == Integer.parseInt(SearchYearText.getText())) { String Brand = wt.getData().getBrand(); String Country = wt.getData().getCountry(); String Region = wt.getData().getRegion(); String Chateau = wt.getData().getChateau(); int YearBottle = wt.getData().getYearOfBottle(); int RPT = wt.getData().getRobertParkerPts(); int NoBottle = wt.getData().getNumberOfBottles(); Object[] arrayW = {Brand, Country, Region, Chateau, YearBottle, RPT, NoBottle}; ((DefaultTableModel)DisplayTable.getModel()).addRow(arrayW); } else { } wt.getNext(); } }
Syntax Highlighting
[
Open in new window
]
Author Comments
if(wt.getData().getCountry().equals(SearchCountryText.getText()) &&
wt.getData().getYearOfBottle() ==
Integer.parseInt(SearchYearText.getText()))
This is where the null pointer is
Rating
4.55 / 8
62 Votes