This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JLayeredPane layers = new JLayeredPane(); | |
layers.setPreferredSize( new Dimension( GRID_SIZE, GRID_SIZE ) ); | |
layers.setLayout(new FlowLayout()); | |
BufferedImage backgroundImage = null; | |
try{ backgroundImage = ImageIO.read(new File("resources/Background.png"));} | |
catch(IOException ex){ | |
System.out.println(ex); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.*; | |
import javax.swing.*; | |
public class ChessBoard extends JFrame implements MouseListener, MouseMotionListener | |
{ | |
JLayeredPane layeredPane; | |
JPanel chessBoard; | |
JLabel chessPiece; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected JLabel createLabelForImage(BufferedImage im) { | |
JLabel label = new JLabel(new ImageIcon(im)); | |
label.setVerticalAlignment(JLabel.TOP); | |
label.setHorizontalAlignment(JLabel.CENTER); | |
label.setOpaque(true); | |
label.setBounds(0, 0, im.getWidth(), im.getHeight()); | |
return label; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int randInt(int min, int max) { | |
// NOTE: Usually this should be a field rather than a method | |
// variable so that it is not re-seeded every call. | |
Random rand = new Random(); | |
// nextInt is normally exclusive of the top value, | |
// so add 1 to make it inclusive | |
int randomNum = rand.nextInt((max - min) + 1) + min; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Border border; | |
border = BorderFactory.createEmptyBorder(); | |
labels[5].setBorder(border); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("duckduckgo.com") | |
{ | |
.result | |
{ | |
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); | |
transition: 0.3s; | |
} | |
/* On mouse-over, add a deeper shadow */ | |
.result:hover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav> | |
<div class="nav-wrapper"> | |
<a href="#" class="brand-logo">Rent Keeper</a> | |
<ul id="nav-mobile" class="right hide-on-med-and-down"> | |
<li><a href="sass.html">Sass</a></li> | |
<li><a href="badges.html">Components</a></li> | |
<li><a href="collapsible.html">JavaScript</a></li> | |
</ul> | |
</div> | |
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<table> | |
<thead> | |
<tr> | |
<th>Previous Meter Reading</th> | |
<th>Current Meter Reading</th> | |
<th>Month</th> | |
<th>Year</th> | |
<th>Extras</th> | |
<th>Total (to be paid)</th> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rents_x = [ | |
{ | |
"extraCost": 0, | |
"meterCurr": 120, | |
"meterPrev": 100, | |
"month": 7, | |
"year": 2018, | |
"paid": 19500, | |
"totalSum": 19500 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RentStruct } from "./rent-struct"; | |
export class RentItem { | |
extraCost: number; | |
meterCurr: number; | |
meterPrev: number; | |
month: number; | |
year: number; | |
paid: number; | |
totalSum: number; |
OlderNewer