This file contains hidden or 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
| /** | |
| * Muestra en pantalla la lista de todas las impresoras disponibles en el | |
| * sistema | |
| */ | |
| public void listarImpresoras() { | |
| PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); | |
| System.out.println("Lista de impresoras disponibles"); | |
| for (PrintService printService: printServices) { | |
| System.out.println("\t" + printService.getName()); |
This file contains hidden or 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
| /** | |
| * Nos regresa el PrintService que representa la impresora con el nombre que | |
| * le indiquemos | |
| * @param printerName nombre de la impresora que deseamos usar | |
| * @return PrintService que representa la impresora que deseamos usar | |
| */ | |
| private PrintService findPrintService(String printerName) { | |
| PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); | |
| for (PrintService printService: printServices) { | |
| System.out.println(printService.getName()); |
This file contains hidden or 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
| ############################################ | |
| # To Completely Block Facebook | |
| # Add these entries below to your hosts file | |
| # | |
| # Your hosts file Location: | |
| # Linux, Unix and Mac OS X -> /etc/hosts | |
| # Windows XP, Vista and Windows 7 -> C:\WINDOWS\system32\drivers\etc\hosts | |
| # Windows 2000 -> C:\WINNT\system32\drivers\etc\hosts | |
| # Windows 98/ME -> C:\WINDOWS\hosts | |
| # |
This file contains hidden or 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
| package mx.hashCode.table; | |
| import java.awt.BorderLayout; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import javax.swing.JButton; | |
| import javax.swing.JFrame; | |
| import javax.swing.JScrollPane; | |
| import javax.swing.JTable; |
This file contains hidden or 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
| package mx.hashCode.unica; | |
| import java.awt.BorderLayout; | |
| import java.awt.event.WindowEvent; | |
| import java.awt.event.WindowListener; | |
| import java.io.IOException; | |
| import java.net.BindException; | |
| import java.net.ServerSocket; | |
| import javax.swing.BorderFactory; |
This file contains hidden or 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
| package mx.hashCode.unica; | |
| /** | |
| * Hello world! | |
| * | |
| */ | |
| public class App | |
| { | |
| public static void main( String[] args ) | |
| { |
This file contains hidden or 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
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package mx.hash.fontsize.fontsizeitext; | |
| import com.itextpdf.kernel.geom.PageSize; | |
| import com.itextpdf.kernel.pdf.PdfDocument; | |
| import com.itextpdf.kernel.pdf.PdfWriter; |
This file contains hidden or 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
| .setFontSize(tamaño) |
This file contains hidden or 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
| // Creamos una celda | |
| Cell celda1 = new Cell(); | |
| // Agregamos el contenido de la celda | |
| celda1.add(new Paragraph("Celda 1")); | |
| // indicamos la altura para la celda | |
| celda1.setHeight(altura); | |
| // agregamos esa celda a la tabla |
This file contains hidden or 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
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package mx.hash.fontsize.tablecellheight; | |
| import com.itextpdf.kernel.geom.PageSize; | |
| import com.itextpdf.kernel.pdf.PdfDocument; | |
| import com.itextpdf.kernel.pdf.PdfWriter; |