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 override CreateParams CreateParams | |
{ | |
get | |
{ | |
const int CS_DROPSHADOW = 0x20000; | |
CreateParams cp = base.CreateParams; | |
cp.ClassStyle |= CS_DROPSHADOW; | |
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED | |
return cp; | |
} |
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
/* | |
* The MIT License | |
* | |
* Copyright 2017 keeptoo. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
int xy,xx; | |
//replace sidepane with your control/container to which you want to move | |
private void sidepaneMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sidepaneMouseDragged | |
// TODO add your handling code here: | |
int x = evt.getXOnScreen(); | |
int y = evt.getYOnScreen(); | |
this.setLocation(x - xx, y - xy); | |
}//GEN-LAST:event_sidepaneMouseDragged | |
private void sidepaneMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sidepaneMousePressed |
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
.table-view .column-header, | |
.table-view .column-header-background .filler { | |
-fx-background-color: #6622CC; | |
} | |
.table-view .column-header .label{ | |
-fx-text-fill: white; | |
-fx-font-weight: bold; | |
-fx-alignment: CENTER_LEFT; | |
} | |
.table-view .cell{ |
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
JPanel panel = new JPanel(); | |
panel.addMouseListener(new MouseAdapter() { | |
@Override | |
public void mousePressed(MouseEvent arg0) { | |
xx = arg0.getX(); | |
xy = arg0.getY(); | |
} | |
}); | |
panel.addMouseMotionListener(new MouseMotionAdapter() { |
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
<application> | |
<service | |
android:name=".updates.BackroundLUpdateService" | |
android:enabled="true" | |
android:exported="true"></service> | |
</application> |
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
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="563.0" prefWidth="1102.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="home.controllers.StudentsController"> | |
<TableView fx:id="tbData" layoutX="20.0" layoutY="192.0" prefHeight="349.0" prefWidth="1066.0" stylesheets="@../css/fullpackstyling.css" AnchorPane.bottomAnchor="22.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="16.0" AnchorPane.topAnchor="192.0"> | |
<columns> | |
<TableColumn fx:id="studentId" prefWidth="75.0" text="StudentId" /> | |
<TableColumn fx:id="firstName" prefWidth="75.0" text="First Name" /> | |
<TableColumn fx:id="lastName" prefWidth="75.0" text="Last Name" /> | |
</columns> | |
<columnResizePolicy> | |
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |
</columnResizePolicy> |
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 home.model.StudentsModel; | |
import javafx.collections.FXCollections; | |
import javafx.collections.ObservableList; | |
import javafx.fxml.FXML; | |
import javafx.fxml.Initializable; | |
import javafx.scene.control.TableColumn; | |
import javafx.scene.control.TableView; | |
import javafx.scene.control.cell.PropertyValueFactory; |
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 javafx.beans.property.SimpleIntegerProperty; | |
import javafx.beans.property.SimpleStringProperty; | |
public class StudentsModel { | |
private SimpleIntegerProperty studentId; | |
private SimpleStringProperty firstName; | |
private SimpleStringProperty lastName; |
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
//on init components | |
//add your TextFields Here | |
JTextField[] tfs = {jTextField1,jTextField2}; | |
setHintText(tfs); | |
private void setHintText(JTextField[] tfs) { | |
for (JTextField jtf : tfs) { | |
jtf.addFocusListener(new FocusListener() { | |
@Override |
OlderNewer