//> using platform jvm
//> using jvm 17
import javax.swing._
import javax.swing.event._
import java.awt._
import java.awt.event._
object HarryPotterPart2App {
def main(args: Array[String]): Unit = {
SwingUtilities.invokeLater(new Runnable {
def run(): Unit = {
// 1. SECURITY VERIFICATION
val correctPassword = "Bixuu02_anime"
val userInput = JOptionPane.showInputDialog(
null,
"? HARRY POTTER SECURITY VERIFICATION (PART 2)\n\nPlease enter Password to access Harry Potter Part 2 Story:",
"Harry Potter Part 2 Access",
JOptionPane.QUESTION_MESSAGE
)
if (userInput == null || userInput != correctPassword) {
JOptionPane.showMessageDialog(
null,
"? Access Denied! Incorrect Password.",
"Error",
JOptionPane.ERROR_MESSAGE
)
sys.exit(0)
}
// 2. STORY DATA (HARRY POTTER PART 2 - EPISODES 1 TO 20 in Hindi & English)
val storyData: Map[String, String] = Map(
"Chapter 1: Dobby's Warning" ->
"""==================================================
|HARRY POTTER PART 2: THE CHAMBER OF SECRETS
|Written & Adapted by Bixuu (Hindi & English Mix)
|==================================================
|
|MAIN CHARACTERS:
| - Harry Potter (The Boy Who Lived)
| - Dobby (The House-Elf)
| - Ron Weasley & Hermione Granger
| - Tom Riddle / Lord Voldemort
|
|CHAPTER 1 STORY & DIALOGUES:
|Summer vacation ke dauran Privet Drive par Dursley family ek important dinner party host kar rahi hai. Achanak Harry ke room mein ek ajeeb creature, Dobby the house-elf, aata hai aur Harry ko warning deta hai ki wo Hogwarts wapas na jaye kyuki wahan bohot bada khatra hai.
|
|Dobby: "Harry Potter must not go back to Hogwarts! There is a plot, a plot to make most terrible things happen!"
|===================================================""".stripMargin,
"Chapter 2: The Burrow" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 2 STORY & DIALOGUES:
|Jab Dursleys Harry ko room mein band kar dete hain, toh Ron Weasley, Fred aur George ek flying Ford Anglia car lekar aate hain aur Harry ki window tod kar use rescue karte hain. Wo Weasley family ke ghar 'The Burrow' pahunchte hain.
|
|Mrs. Weasley (Gusse mein): "Flying a car! Agar Muggle ne dekh liya hota toh?!"
|Par wo Harry ko bahut pyaar se khana khilati hain.
|===================================================""".stripMargin,
"Chapter 3: Flourish and Blotts" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 3 STORY & DIALOGUES:
|Sabhi Diagon Alley jate hain school books kharidne. Wahan unki mulakat naye Defense Against the Dark Arts teacher, Gilderoy Lockhart se hoti hai. Bookshop ke bahar Lucius Malfoy aur Arthur Weasley ke beech ladai ho jati hai, aur chupke se Lucius ek purani diary Ginny ki book mein daal deta hai.
|
|Lucius Malfoy: "Here, little girl... take your book. It's best your father can afford."
|===================================================""".stripMargin,
"Chapter 4: The Whomping Willow" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 4 STORY & DIALOGUES:
|King's Cross Station par barrier band ho jane ki wajah se Harry aur Ron Hogwarts Express nahi pakad pate. Wo flying Ford Anglia se school ke liye nikalte hain, par Hogwarts pahunchte hi car control se bahar ho jati hai aur ek khatarnak ped 'Whomping Willow' se takra jati hai.
|
|Ron: "My wand! Look at my wand!" (Wand tut jati hai.)
|===================================================""".stripMargin,
"Chapter 5: Gilderoy Lockhart's Classes" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 5 STORY & DIALOGUES:
|School shuru hota hai. Professor Lockhart apni class mein Cornish pixies chhod dete hain jo poori class mein tabahi macha dete hain, aur Lockhart khud unhe control nahi kar pata. Hermione apne spells se unhe wapas cage mein daal deti hai.
|
|Lockhart: "Well done, Miss Granger! Top marks!"
|===================================================""".stripMargin,
"Chapter 6: Mudbloods and Murmurs" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 6 STORY & DIALOGUES:
|Quidditch practice ke dauran Draco Malfoy Hermione ko ek apmaanjanak shabd 'Mudblood' kehta hai. Ron gusse mein apni tuti hui wand se spell marta hai, jiska asar ulta padta hai aur Ron ko ulti mein slugs (keede) nikalne lagte hain.
|
|Hermione: "Ye bohot bura spell hai Ron!"
|===================================================""".stripMargin,
"Chapter 7: The Voice in the Walls" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 7 STORY & DIALOGUES:
|Detention ke baad wapas aate waqt Harry ko deewaron ke andar se ek ajeeb aur aisi aawaz sunai deti hai jo kisi ko marne ki baat kar rahi hoti hai: "Let me rip you... let me kill you..." Harry daudta hua corridor mein jata hai aur deewar par khoon se likha message dekhta hai.
|
|Harry: "Tumne ye aawaz suni na? Koi keh raha tha ki use khoon chahiye!"
|===================================================""".stripMargin,
"Chapter 8: The Writing on the Wall" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 8 STORY & DIALOGUES:
|Sabhi students wahan ikattha ho jate hain. Deewar par red aksharon mein likha hota hai: "The Chamber of Secrets has been opened. Enemies of the heir, beware." Wahin paas mein caretaker Argus Filch ki billi Mrs. Norris pathar (petrified) bani latki hoti hai.
|
|Maleficent Malfoy: "You'll be next, Mudbloods!"
|===================================================""".stripMargin,
"Chapter 9: The Polyjuice Potion" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 9 STORY & DIALOGUES:
|Hermione pata lagati hai ki ek aisi potion hai jo roop badal sakti hai?Polyjuice Potion. Wo Moaning Myrtle ke purane bathroom mein isey brew karne lagti hai taaki wo Malfoy se sach ugalwa sakein ki Heir of Slytherin kaun hai.
|
|Hermione: "Isko tayar hone mein ek mahina lagega."
|===================================================""".stripMargin,
"Chapter 10: The Dueling Club" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 10 STORY & DIALOGUES:
|Lockhart ek Dueling Club banata hai jismein Harry aur Draco Malfoy ki fight hoti hai. Draco ek snake summon karta hai. Jab snake Harry par hamla karne lagta hai, toh Harry achanak snake ki bhasha (Parseltongue) mein baat karne lagta hai. Sabhi darr jate hain ki Harry hi Slytherin ka heir hai.
|
|Ron: "Harry, tum snake se baat kar rahe the! Tumhe Parseltongue aati hai?!"
|===================================================""".stripMargin,
"Chapter 11: Riddle's Diary" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 11 STORY & DIALOGUES:
|Bathroom mein dhoondte waqt Harry ko ek khali diary milti hai jo Tom Riddle naam ke student ki hoti hai. Jab Harry usme ink dalta hai, toh diary se baat hone lagti hai aur wo 50 saal purane past mein chala jata hai, jahan wo Hagrid ko ek monster chhodte dekhta hai.
|
|Tom Riddle: "Do you want to see who opened the Chamber fifty years ago?"
|===================================================""".stripMargin,
"Chapter 12: Following the Spiders" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 12 STORY & DIALOGUES:
|Hagrid ko baad mein Azkaban jail bhej diya jata hai, par jaane se pehle wo kehta hai "Follow the spiders." Harry aur Ron Forbidden Forest jate hain jahan unhe hazaron makdiyan milti hain aur unka king Aragog batata hai ki Hagrid be-gunah tha.
|
|Ron (Darr ke maare): "Why spiders?! Why couldn't it be 'follow the butterflies'?"
|===================================================""".stripMargin,
"Chapter 13: The Heir of Slytherin" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 13 STORY & DIALOGUES:
|School band hone ki kagar par hota hai. Hermione attack ho kar petrified ho jati hai, par jane se pehle wo apne haath mein ek paper chhod jati hai jismein 'Basilisk' (ek giant snake jo aankh mein dekhne se hi mar deta hai) ka rahasya likha hota hai. Ginny Weasley ko bhi kidnap karke Chamber ke andar le jaya jata hai.
|
|Professor McGonagall: "Ginny Weasley's body has been taken into the Chamber."
|===================================================""".stripMargin,
"Chapter 14: Entering the Chamber" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 14 STORY & DIALOGUES:
|Harry aur Ron Lockhart ko sath lekar Moaning Myrtle ke bathroom jate hain. Sink par ek chota sa snake symbol dekh kar Harry Parseltongue mein bolta hai, aur zameen khul jati hai. Niche utarte waqt Lockhart apni memory wipe karne wala spell try karta hai, par spell ulta pad jata hai aur cave ka rasta band ho jata hai, jisse Ron aur Harry alag ho jate hain.
|
|Harry: "Ron, tum yahin ruko, main Ginny ko bachane ja raha hoon!"
|===================================================""".stripMargin,
"Chapter 15: The Basilisk Battle" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 15 STORY & DIALOGUES:
|Harry chamber ke andar pahunchta hai jahan Ginny behosh padi hoti hai aur Tom Riddle wahan khada hota hai. Tom batata hai ki wahi young Voldemort hai jo diary ke zariye wapas aa raha hai. Wo ek vishal Basilisk ko Harry par hamla karne ke liye bulata hai.
|
|Tom Riddle: "Killing monsters is my specialty, Harry Potter."
|===================================================""".stripMargin,
"Chapter 16: Fawkes and the Sorting Hat" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 16 STORY & DIALOGUES:
|Jab lagta hai ki Harry mar jayega, tab Dumbledore ka phoenix bird Fawkes achanak aakar Basilisk ki aakhein noch leta hai aur Sorting Hat lekar aata hai. Harry us topi se ek chamakdar talwar (Sword of Gryffindor) nikal leta hai.
|
|Harry: "Let's finish this!"
|===================================================""".stripMargin,
"Chapter 17: Defeating the Basilisk" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 17 STORY & DIALOGUES:
|Harry poori taakat se Basilisk ke muh mein talwar ghusa kar use maar deta hai, par ek zehreela daant (fang) Harry ke arm mein lag jata hai. Marne se pehle Harry wahi fang Tom Riddle ki diary mein ghusa deta hai, jisse Voldemort ka memory roop destroy ho jata hai.
|
|Tom Riddle: "Nooo!" (Awaaz ke sath vanish ho jata hai.)
|===================================================""".stripMargin,
"Chapter 18: Healing Tears" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 18 STORY & DIALOGUES:
|Harry jab ant ke kareeb hota hai, tab Fawkes phoenix apne aasuon (tears) ko Harry ke zakhm par girata hai. Phoenix ke aasuon mein healing powers hoti hain aur Harry ka zehar utar jata hai. Ginny bhi hosh mein aa jati hai.
|
|Ginny: "Harry! Tumne mujhe bacha liya!"
|===================================================""".stripMargin,
"Chapter 19: The Feast and Release" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 19 STORY & DIALOGUES:
|Sabhi wapas Great Hall lautte hain. Hagrid Azkaban se free hokar wapas aata hai aur poora school khushi se jhoom uthta hai. Exams cancel kar diye jate hain aur sabhi doston ka reunion hota hai.
|
|Hermione (Daudte hue aakar): "You solved it! You actually solved it!"
|===================================================""".stripMargin,
"Chapter 20: Part 2 Grand Finale & Epilogue" ->
"""==================================================
|WRITTEN BY BIXUU
|==================================================
|CHAPTER 20 STORY & DIALOGUES (PART 2 FINALE):
|Term khatam hone par sabhi Hogwarts Express se wapas ghar ke liye rawana hote hain. Harry khush hota hai ki usne ek baar fir doston ki jaan bachayi.
|
|THE END - HARRY POTTER PART 2 WRITTEN & ADAPTED BY BIXUU.
|==================================================
|
|? ANNOUNCEMENT FROM CREATOR BIXUU:
|"BIXUU SUCCESSFULLY CREATED HARRY POTTER PART 2 (CHAMBER OF SECRETS)!
|Hope you loved Part 2 as much as Part 1. Stay tuned for Part 3!"
|===================================================""".stripMargin
)
// 3. GUI WINDOW CREATION
val frame = new JFrame("Harry Potter Viewer: HARRY POTTER PART 2 - By Bixuu")
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE)
frame.setSize(950, 650)
frame.setLocationRelativeTo(null)
// Header Theme Color (Wizarding Dark Maroon & Gold)
val headerLabel = new JLabel(" ? HARRY POTTER PART 2: THE CHAMBER OF SECRETS (Adapted by Bixuu) ", SwingConstants.CENTER)
headerLabel.setFont(new Font("Arial", Font.BOLD, 14))
headerLabel.setOpaque(true)
headerLabel.setBackground(new Color(40, 10, 10))
headerLabel.setForeground(Color.WHITE)
headerLabel.setPreferredSize(new Dimension(950, 40))
// Chapter List
val chapterKeys = (1 to 20).map(i => storyData.keys.find(_.startsWith(s"Chapter $i:")).getOrElse(s"Chapter $i")).toArray
val listModel = new DefaultListModel[String]()
chapterKeys.foreach(listModel.addElement)
val chapterList = new JList[String](listModel)
chapterList.setFont(new Font("Arial", Font.PLAIN, 12))
chapterList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
chapterList.setSelectedIndex(0)
val listScrollPane = new JScrollPane(chapterList)
listScrollPane.setPreferredSize(new Dimension(320, 500))
// Story Text Area
val storyArea = new JTextArea()
storyArea.setFont(new Font("Monospaced", Font.PLAIN, 13))
storyArea.setEditable(false)
storyArea.setLineWrap(true)
storyArea.setWrapStyleWord(true)
storyArea.setBackground(new Color(20, 20, 20))
storyArea.setForeground(new Color(230, 230, 230))
storyArea.setText(storyData(chapterKeys(0)))
storyArea.setCaretPosition(0)
val textScrollPane = new JScrollPane(storyArea)
// Selection Listener
chapterList.addListSelectionListener(new ListSelectionListener {
def valueChanged(e: ListSelectionEvent): Unit = {
if (!e.getValueIsAdjusting) {
val selectedKey = chapterList.getSelectedValue
if (selectedKey != null && storyData.contains(selectedKey)) {
storyArea.setText(storyData(selectedKey))
storyArea.setCaretPosition(0)
}
}
}
})
// Layout Assembly
val mainPanel = new JPanel(new BorderLayout())
mainPanel.add(headerLabel, BorderLayout.NORTH)
mainPanel.add(listScrollPane, BorderLayout.WEST)
mainPanel.add(textScrollPane, BorderLayout.CENTER)
frame.add(mainPanel)
frame.setVisible(true)
}
})
}
}
HarryPotterPart2App.main(Array())