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
/* | |
* A Bunifu Charts Get Started code | |
* Copyright 2021 Bunifu Framework. | |
*/ | |
public static void renderBarchart(Bunifu.Charts.WinForms.BunifuChartCanvas bunifuChartCanvas) | |
{ | |
Bunifu.Charts.WinForms.ChartTypes.BunifuBarChart bunifuBarChart = new Bunifu.Charts.WinForms.ChartTypes.BunifuBarChart(); | |
/* | |
* For this example we will use random numbers |
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
if (OSUtils.getOSType() == OSUtils.OSType.MacOS) { | |
pnlTop.remove(pnlTitle); | |
pnlTop.remove(pnlRight); | |
pnlTop.add(pnlTitle, BorderLayout.EAST); | |
pnlTop.add(pnlActions, BorderLayout.WEST); | |
pnlActions.remove(lblClose); | |
pnlActions.remove(lblMaximize); | |
pnlActions.remove(lblMinimize); |
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 |
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
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
<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
<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
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
.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
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 |
NewerOlder