Skip to content

Instantly share code, notes, and snippets.

View fanjavaid's full-sized avatar
:electron:

Fandi Akhmad fanjavaid

:electron:
View GitHub Profile
public void getDoctorData() {
DoctorService doctorService = new DoctorService();
List<Doctor> list = doctorService.selectAll();
Vector vecModel = new Vector();
for (Doctor doctor : list) {
String name = doctor.getFirstname()+" "+doctor.getLastname();
int id = doctor.getId();
vecModel.addElement(new Doctor(id, name));
public class DoctorComboBoxListener implements ActionListener{
@Override
public void actionPerformed(ActionEvent e) {
Doctor doctor = (Doctor) MainFrame.cmbDoctor.getSelectedItem();
System.out.println(doctor.getId());
}
}
public class ServerData {
private boolean directory;
private String fileName;
private String dateModified;
private String user;
private Long size;
private String permissions;
public boolean isDirectory() {
return directory;
@fanjavaid
fanjavaid / Application.java
Created February 27, 2013 07:11
Menampilkan data yang bersesuain di JComboBox
/**
*
* @author akhmad
*/
public class Application extends javax.swing.JFrame {
private Connection connection;
/**
* Creates new form Application
@fanjavaid
fanjavaid / ContohKelas.java
Created March 14, 2013 03:56
Pemanggilan Listener lain di dalam ActionListener
public class ContohKelas implements PropertyChangeListener {
public void createGraph() {
// Pemanggilan diluar ActionListener dengan this sukses.
// graph = DSCapture.fromUserDialog(jf, DSFiltergraph.DD7, this);
btnStart.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@fanjavaid
fanjavaid / CentOS-Base.repo
Created April 17, 2013 02:33
CentOS-Base.repo
[base]
name=CentOS
baseurl=http://mirror.centos.org/centos/5/os/x86_64
enabled=1
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos
[update]
name=CentOS
baseurl=http://mirror.centos.org/centos/5/updates/x86_64
@fanjavaid
fanjavaid / PatientController.java
Created July 15, 2013 21:54
Method untuk menampilkan gambar/video dari File
public void getStreamData(final PanelEntry view, final String data) {
String files = null;
String path = null;
if(isImages()) {
path = "data/"+data+"/images";
} else {
path = "data/"+data+"/videos/thumbs";
}
@fanjavaid
fanjavaid / TableModel.java
Created July 27, 2013 16:14
Membuat TableModel
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fandi.barang;
import java.util.ArrayList;
import java.util.List;
import javax.swing.table.AbstractTableModel;
@fanjavaid
fanjavaid / rpt_transaksi.jrxml
Created October 24, 2013 08:06
Transaction Report
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="rpt_transaksi" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e1435644-0f7c-4dd3-bdc8-0af94b9b7006">
<property name="ireport.zoom" value="1.272292855117455"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[SELECT expenses, amount, tgl_transaksi FROM tb_transaksi_beli;]]>
</queryString>
<field name="expenses" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
@fanjavaid
fanjavaid / MataKuliahActivity
Created April 13, 2014 13:46
Retrieve data from URL and return as JSON and then processed by this Activity in AsyncTask.
package com.fanjavaid.valore.app;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;